Commit de0100f2 authored by Eli Zaretskii's avatar Eli Zaretskii

Fix bug #10902 with cursor positioning at EOB.

 src/xdisp.c (try_window_reusing_current_matrix): Don't move cursor
 position past the first glyph_row that ends at ZV.
parent d49902e4
2012-03-02 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (try_window_reusing_current_matrix): Don't move cursor
position past the first glyph_row that ends at ZV. (Bug#10902)
2012-03-02 Glenn Morris <rgm@gnu.org>
* buffer.c (buffer-list-update-hook): Doc fix.
......
......@@ -16322,7 +16322,10 @@ try_window_reusing_current_matrix (struct window *w)
++first_row_to_display)
{
if (PT >= MATRIX_ROW_START_CHARPOS (first_row_to_display)
&& PT < MATRIX_ROW_END_CHARPOS (first_row_to_display))
&& (PT < MATRIX_ROW_END_CHARPOS (first_row_to_display)
|| (PT == MATRIX_ROW_END_CHARPOS (first_row_to_display)
&& first_row_to_display->ends_at_zv_p
&& pt_row == NULL)))
pt_row = first_row_to_display;
}
......@@ -16414,7 +16417,9 @@ try_window_reusing_current_matrix (struct window *w)
if (pt_row)
{
for (row = MATRIX_ROW (w->current_matrix, w->cursor.vpos);
row < bottom_row && PT >= MATRIX_ROW_END_CHARPOS (row);
row < bottom_row
&& PT >= MATRIX_ROW_END_CHARPOS (row)
&& !row->ends_at_zv_p;
row++)
{
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