From c83d0c5fdfd374d5c2e1547d05f02ab3b47a4a5a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 19 Sep 2017 20:11:42 +0300 Subject: [PATCH] Fix crashes in 'move-point-visually' in minibuffer windows * src/xdisp.c (Fmove_point_visually): Fix off-by-one error in comparing against the last valid glyph_row of a window glyph matrix. (Bug#28505) --- src/xdisp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index dc5dbb05762..141275f15a0 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -22395,8 +22395,8 @@ Value is the new character position of point. */) row += dir; else row -= dir; - if (row < MATRIX_FIRST_TEXT_ROW (w->current_matrix) - || row > MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w)) + if (!(MATRIX_FIRST_TEXT_ROW (w->current_matrix) <= row + && row < MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w))) goto simulate_display; if (dir > 0) -- 2.39.5