From: Eli Zaretskii Date: Sun, 30 Oct 2011 18:07:48 +0000 (+0200) Subject: Fix random crashes while scrolling backwards. X-Git-Url: https://git.hcoop.net/bpt/emacs.git/commitdiff_plain/c2ff3c02a4dc328157427a4c045494edd789d204 Fix random crashes while scrolling backwards. src/xdisp.c (try_cursor_movement): Make sure ROW isn't decremented past the beginning of the current glyph matrix. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9f8fa94d48..0bb16514b5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-10-30 Eli Zaretskii + + * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented + past the beginning of the current glyph matrix. + 2011-10-30 Adam Sjøgren (tiny change) * xterm.c: Include X11/Xproto.h if HAVE_GTK3. diff --git a/src/xdisp.c b/src/xdisp.c index 22f7c2bbd2..33c5fc0d23 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14829,8 +14829,6 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste bidi-reordered rows. */ while (MATRIX_ROW_CONTINUATION_LINE_P (row)) { - xassert (row->enabled_p); - --row; /* If we hit the beginning of the displayed portion without finding the first row of a continued line, give up. */ @@ -14839,7 +14837,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste rc = CURSOR_MOVEMENT_MUST_SCROLL; break; } - + xassert (row->enabled_p); + --row; } } if (must_scroll)