]> code.delx.au - gnu-emacs/commitdiff
Merge from emacs-23; up to 2010-06-11T18:51:00Z!juri@jurta.org.
authorGlenn Morris <rgm@gnu.org>
Sat, 21 May 2011 02:15:34 +0000 (19:15 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 21 May 2011 02:15:34 +0000 (19:15 -0700)
src/ChangeLog
src/dispnew.c

index feed5157c8a630d8586acaa04de8000c4a194a8a..bcc79800aaf560b3f6945330d752f2663948e23f 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-21  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * dispnew.c (scrolling_window): Don't exclude the case that the
+       last enabled row in the desired matrix touches the bottom boundary.
+
 2011-05-21  Glenn Morris  <rgm@gnu.org>
 
        * Makefile.in ($(etc)/DOC): Make second command line even shorter.
index 0457d650b3a13cb76f4ef487d5f3c441305ef181..41f486baf16379281916d36368061ed08f924fff 100644 (file)
@@ -4330,23 +4330,29 @@ scrolling_window (struct window *w, int header_line_p)
 
   first_old = first_new = i;
 
-  /* Set last_new to the index + 1 of the last enabled row in the
-     desired matrix.  */
+  /* Set last_new to the index + 1 of the row that reaches the
+     bottom boundary in the desired matrix.  Give up if we find a
+     disabled row before we reach the bottom boundary.  */
   i = first_new + 1;
-  while (i < desired_matrix->nrows - 1
-        && MATRIX_ROW (desired_matrix, i)->enabled_p
-        && MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i)) <= yb)
-    ++i;
+  while (i < desired_matrix->nrows - 1)
+    {
+      int bottom;
 
-  if (!MATRIX_ROW (desired_matrix, i)->enabled_p)
-    return 0;
+      if (!MATRIX_ROW (desired_matrix, i)->enabled_p)
+       return 0;
+      bottom = MATRIX_ROW_BOTTOM_Y (MATRIX_ROW (desired_matrix, i));
+      if (bottom <= yb)
+       ++i;
+      if (bottom >= yb)
+       break;
+    }
 
   last_new = i;
 
-  /* Set last_old to the index + 1 of the last enabled row in the
-     current matrix.  We don't look at the enabled flag here because
-     we plan to reuse part of the display even if other parts are
-     disabled.  */
+  /* Set last_old to the index + 1 of the row that reaches the bottom
+     boundary in the current matrix.  We don't look at the enabled
+     flag here because we plan to reuse part of the display even if
+     other parts are disabled.  */
   i = first_old + 1;
   while (i < current_matrix->nrows - 1)
     {