summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2011-11-12 12:09:38 +0200
committerEli Zaretskii <eliz@gnu.org>2011-11-12 12:09:38 +0200
commit1e5b2111b6ebfa6f8e244add939de453e9feafe6 (patch)
tree3017807f69469c1bfdf3b2fc0ce4181648ffa60c
parent89d612214e95564c06c775189f8994001e3e1c06 (diff)
downloademacs-1e5b2111b6ebfa6f8e244add939de453e9feafe6.tar.gz
dispnew.c (scrolling_window): Fix index usage.
src/dispnew.c (scrolling_window): Fix incorrect indices in accessing current_matrix and desired_matrix. (Bug#9990)
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dispnew.c8
2 files changed, 9 insertions, 4 deletions
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 <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.
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;