aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan Bockgård2011-09-15 19:02:49 +0300
committerEli Zaretskii2011-09-15 19:02:49 +0300
commit72589a3ceebd3b6c903963e5f82b78df004e851d (patch)
treec9614314902183adb54f47b2912686adbb6724e1 /src
parent983a899097fbdfde89fbad97a1487e76d6ad237d (diff)
downloademacs-72589a3ceebd3b6c903963e5f82b78df004e851d.tar.gz
emacs-72589a3ceebd3b6c903963e5f82b78df004e851d.zip
Fix bug #9495 with cursor positioning on truncated lines.
Patch by Johan Bockgוrd <bojohan@gnu.org> src/xdisp.c (try_cursor_movement): Only check for exact match if cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3dbddc9b215..83dc66a1720 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12011-09-15 Johan Bockgård <bojohan@gnu.org>
2
3 * xdisp.c (try_cursor_movement): Only check for exact match if
4 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
5
12011-09-14 Paul Eggert <eggert@cs.ucla.edu> 62011-09-14 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Remove unused external symbols. 8 Remove unused external symbols.
diff --git a/src/xdisp.c b/src/xdisp.c
index 1ccaa0641b0..0f842b8673e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14627,7 +14627,10 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
14627 is set, we are done. */ 14627 is set, we are done. */
14628 at_zv_p = 14628 at_zv_p =
14629 MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p; 14629 MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p;
14630 if (!at_zv_p) 14630 if (rv && !at_zv_p
14631 && w->cursor.hpos >= 0
14632 && w->cursor.hpos < MATRIX_ROW_USED (w->current_matrix,
14633 w->cursor.vpos))
14631 { 14634 {
14632 struct glyph_row *candidate = 14635 struct glyph_row *candidate =
14633 MATRIX_ROW (w->current_matrix, w->cursor.vpos); 14636 MATRIX_ROW (w->current_matrix, w->cursor.vpos);