Commit 72589a3c authored by Johan Bockgård's avatar Johan Bockgård Committed by Eli Zaretskii
Browse files

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)
parent 983a8990
2011-09-15 Johan Bockgård <bojohan@gnu.org>
* xdisp.c (try_cursor_movement): Only check for exact match if
cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
Remove unused external symbols.
......
......@@ -14627,7 +14627,10 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
is set, we are done. */
at_zv_p =
MATRIX_ROW (w->current_matrix, w->cursor.vpos)->ends_at_zv_p;
if (!at_zv_p)
if (rv && !at_zv_p
&& w->cursor.hpos >= 0
&& w->cursor.hpos < MATRIX_ROW_USED (w->current_matrix,
w->cursor.vpos))
{
struct glyph_row *candidate =
MATRIX_ROW (w->current_matrix, w->cursor.vpos);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment