From: Eli Zaretskii Date: Sat, 12 Nov 2011 10:09:38 +0000 (+0200) Subject: dispnew.c (scrolling_window): Fix index usage. X-Git-Tag: emacs-pretest-24.0.92~204 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e5b2111b6ebfa6f8e244add939de453e9feafe6;p=emacs.git dispnew.c (scrolling_window): Fix index usage. src/dispnew.c (scrolling_window): Fix incorrect indices in accessing current_matrix and desired_matrix. (Bug#9990) --- diff --git a/src/ChangeLog b/src/ChangeLog index 12c09935328..71c2ff3131e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-11-12 Eli Zaretskii + + * dispnew.c (scrolling_window): Fix incorrect indices in accessing + current_matrix and desired_matrix. (Bug#9990) + 2011-11-12 Martin Rudalics * window.h (window): Remove splits slot. diff --git a/src/dispnew.c b/src/dispnew.c index 46d1917b144..dafb8127eb3 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4334,10 +4334,10 @@ scrolling_window (struct window *w, int header_line_p) j = last_old; while (i - 1 > first_new && j - 1 > first_old - && MATRIX_ROW (current_matrix, i - 1)->enabled_p - && (MATRIX_ROW (current_matrix, i - 1)->y - == MATRIX_ROW (desired_matrix, j - 1)->y) - && !MATRIX_ROW (desired_matrix, j - 1)->redraw_fringe_bitmaps_p + && MATRIX_ROW (current_matrix, j - 1)->enabled_p + && (MATRIX_ROW (current_matrix, j - 1)->y + == MATRIX_ROW (desired_matrix, i - 1)->y) + && !MATRIX_ROW (desired_matrix, i - 1)->redraw_fringe_bitmaps_p && row_equal_p (MATRIX_ROW (desired_matrix, i - 1), MATRIX_ROW (current_matrix, j - 1), 1)) --i, --j;