]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crashes in 'move-point-visually' in minibuffer windows
authorEli Zaretskii <eliz@gnu.org>
Tue, 19 Sep 2017 17:11:42 +0000 (20:11 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 19 Sep 2017 17:11:42 +0000 (20:11 +0300)
* 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

index dc5dbb0576228f610d04bdb1b830482ea76b85c4..141275f15a09e79afd848a1a88a82e0c01a398f4 100644 (file)
@@ -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)