From e25be79236edca0e26a9fcd81b7f2a3746e8f9ef Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 25 Aug 2011 20:16:39 +0300 Subject: [PATCH] Fix last change for text terminals. src/xdisp.c (try_cursor_movement): Don't advance `row' beyond the last row of the window. --- src/ChangeLog | 3 ++- src/xdisp.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 1176c9254ea..149753a6749 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,7 +8,8 @@ `(space ...)', and specifies display in the text area, return 2 rather than 1. (try_cursor_movement): Check for the need to scroll more - accurately, and prefer exact match for point under bidi. + accurately, and prefer exact match for point under bidi. Don't + advance `row' beyond the last row of the window. * dispextern.h (struct bidi_it): Rename the disp_prop_p member into disp_prop; all users changed. diff --git a/src/xdisp.c b/src/xdisp.c index 55bbb7cf62e..beb161f4ce4 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14624,6 +14624,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste rc = CURSOR_MOVEMENT_SUCCESS; break; } + if (MATRIX_ROW_BOTTOM_Y (row) == last_y) + break; ++row; } while (((MATRIX_ROW_CONTINUATION_LINE_P (row) -- 2.39.2