diff options
author | Eli Zaretskii <eliz@gnu.org> | 2014-06-16 22:38:28 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2014-06-16 22:38:28 +0300 |
commit | 4f9dc9b61df1ee2128f4e0cb9dda66860c625159 (patch) | |
tree | eec09cf88b423dc9b71edfdf991f80d9c8c999e1 | |
parent | 6a7faa16644364dc86e5b47c86be803664be94f7 (diff) | |
download | emacs-4f9dc9b61df1ee2128f4e0cb9dda66860c625159.tar.gz |
A better fix for bug #17777 with visual-order cursor movement.
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.
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/xdisp.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6e312e79d7d..2c27be577a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 diff --git a/src/xdisp.c b/src/xdisp.c index b1c7ee92b54..1106e6fe25f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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) |