emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116701: Fix bug #16961 with visual-order cursor mov


From: Eli Zaretskii
Subject: [Emacs-diffs] trunk r116701: Fix bug #16961 with visual-order cursor movement and word-wrap.
Date: Fri, 07 Mar 2014 20:01:31 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116701
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16961
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2014-03-07 22:00:33 +0200
message:
  Fix bug #16961 with visual-order cursor movement and word-wrap.
  
   src/xdisp.c (Fmove_point_visually): When under word-wrap, accept
   also return value of MOVE_POS_MATCH_OR_ZV from
   move_it_in_display_line_to, when moving from beginning of line to
   point's position.
modified:
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-03-07 15:11:12 +0000
+++ b/src/ChangeLog     2014-03-07 20:00:33 +0000
@@ -1,3 +1,10 @@
+2014-03-07  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (Fmove_point_visually): When under word-wrap, accept
+       also return value of MOVE_POS_MATCH_OR_ZV from
+       move_it_in_display_line_to, when moving from beginning of line to
+       point's position.  (Bug#16961)
+
 2014-03-07  Martin Rudalics  <address@hidden>
 
        * buffer.c (Vbuffer_list_update_hook): Doc-string fix.

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-02-28 10:32:11 +0000
+++ b/src/xdisp.c       2014-03-07 20:00:33 +0000
@@ -20895,7 +20895,12 @@
            new_pos = it.current.pos;
 
          while (it.current_x + it.pixel_width <= target_x
-                && rc == MOVE_X_REACHED)
+                && (rc == MOVE_X_REACHED
+                    /* Under word-wrap, move_it_in_display_line_to
+                       stops at correct coordinates, but sometimes
+                       returns MOVE_POS_MATCH_OR_ZV.  */
+                    || (it.line_wrap == WORD_WRAP
+                        && rc == MOVE_POS_MATCH_OR_ZV)))
            {
              int new_x = it.current_x + it.pixel_width;
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]