]> git.eshelyaron.com Git - emacs.git/commitdiff
A better fix for bug #17777 with visual-order cursor movement.
authorEli Zaretskii <eliz@gnu.org>
Mon, 16 Jun 2014 19:38:28 +0000 (22:38 +0300)
committerEli Zaretskii <eliz@gnu.org>
Mon, 16 Jun 2014 19:38:28 +0000 (22:38 +0300)
 src/xdisp.c (Fmove_point_visually): Instead of testing for keyboard
 macro execution, make sure point didn't move since last complete
 redisplay, as the condition for using the glyph matrix
 information.

src/ChangeLog
src/xdisp.c

index 6e312e79d7d4e20ecb7a8c817996eb45b0e6a740..2c27be577a74ec16e9c241d8ad2f589baf338c7c 100644 (file)
@@ -1,3 +1,10 @@
+2014-06-16  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
+       macro execution, make sure point didn't move since last complete
+       redisplay, as the condition for using the glyph matrix
+       information.  (Bug#17777)
+
 2014-06-14  Eli Zaretskii  <eliz@gnu.org>
 
        * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
index b1c7ee92b54c362690518c4572613ccf2c0030f8..1106e6fe25f447ca9b4152cb6362a1593a470952 100644 (file)
@@ -20757,12 +20757,15 @@ Value is the new character position of point.  */)
      recorded in the glyphs, at least as long as the goal is on the
      screen.  */
   if (w->window_end_valid
-      && NILP (Vexecuting_kbd_macro)
       && !windows_or_buffers_changed
       && b
       && !b->clip_changed
       && !b->prevent_redisplay_optimizations_p
       && !window_outdated (w)
+      /* We rely below on the cursor coordinates to be up to date, but
+        we cannot trust them if some command moved point since the
+        last complete redisplay.  */
+      && w->last_point == BUF_PT (b)
       && w->cursor.vpos >= 0
       && w->cursor.vpos < w->current_matrix->nrows
       && (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos))->enabled_p)