]> git.eshelyaron.com Git - emacs.git/commitdiff
dispnew.c (scrolling_window): Fix index usage.
authorEli Zaretskii <eliz@gnu.org>
Sat, 12 Nov 2011 10:09:38 +0000 (12:09 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 12 Nov 2011 10:09:38 +0000 (12:09 +0200)
 src/dispnew.c (scrolling_window): Fix incorrect indices in accessing
 current_matrix and desired_matrix.  (Bug#9990)

src/ChangeLog
src/dispnew.c

index 12c09935328cf3f84636b260c0a55cad41531679..71c2ff3131e3135448fdc0b6a4ff11d6161f1dcc 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * dispnew.c (scrolling_window): Fix incorrect indices in accessing
+       current_matrix and desired_matrix.  (Bug#9990)
+
 2011-11-12  Martin Rudalics  <rudalics@gmx.at>
 
        * window.h (window): Remove splits slot.
index 46d1917b14401e544e10acb02c4b1bc9522d16fb..dafb8127eb38468abbb575ec2ca5133009e00b09 100644 (file)
@@ -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;