]> git.eshelyaron.com Git - emacs.git/commitdiff
(try_window_id): Don't display lines after the window
authorGerd Moellmann <gerd@gnu.org>
Wed, 17 Oct 2001 14:05:34 +0000 (14:05 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 17 Oct 2001 14:05:34 +0000 (14:05 +0000)
end if the rest of the window after the window end was already
blank.

src/ChangeLog
src/xdisp.c

index 9cf6a721aa175cf681b096c46d219bcd43835922..67bf8de2fb539d04e45dfdd34c9f48e676d4a74f 100644 (file)
@@ -1,5 +1,12 @@
 2001-10-17  Gerd Moellmann  <gerd@gnu.org>
 
+       * xdisp.c (try_window_id): Don't display lines after the window
+       end if the rest of the window after the window end was already
+       blank.
+       
+       * xdisp.c (try_window_id): Remove code that was only there 
+       for the release of 21.1.
+
        * xdisp.c (display_line): Don't indicate empty lines in
        mini-windows.
 
index 533b79273470cc293d750e40e189bb1a2baae66a..f1d1f7926851866783a6152cacfb219e7f637128 100644 (file)
@@ -11799,6 +11799,8 @@ try_window_id (w)
   last_text_row_at_end = NULL;
   if (dy < 0)
     {
+      /* Scrolling up can leave for example a partially visible line
+        at the end of the window to be redisplayed.  */
       /* Set last_row to the glyph row in the current matrix where the
         window end line is found.  It has been moved up or down in
         the matrix by dvpos.  */
@@ -11825,23 +11827,29 @@ try_window_id (w)
          ++last_row;
        }
 
-      /* We may start in a continuation line.  If so, we have to get
-        the right continuation_lines_width and current_x.  */
-      it.continuation_lines_width = last_row->continuation_lines_width;
-      it.hpos = it.current_x = 0;
-      
-      /* Display the rest of the lines at the window end.  */
-      it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
-      while (it.current_y < it.last_visible_y
-            && !fonts_changed_p)
+      if (IT_CHARPOS (it) < ZV)
        {
-         /* Is it always sure that the display agrees with lines in
-            the current matrix?  I don't think so, so we mark rows
-            displayed invalid in the current matrix by setting their
-            enabled_p flag to zero.  */
-         MATRIX_ROW (w->current_matrix, it.vpos)->enabled_p = 0;
-         if (display_line (&it))
-           last_text_row_at_end = it.glyph_row - 1;
+         /* Otherwise, the rest of the window after the window
+            end was blank, and scrolling didn't change that.  */
+
+         /* We may start in a continuation line.  If so, we have to
+            get the right continuation_lines_width and current_x.  */
+         it.continuation_lines_width = last_row->continuation_lines_width;
+         it.hpos = it.current_x = 0;
+
+         /* Display the rest of the lines at the window end.  */
+         it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos);
+         while (it.current_y < it.last_visible_y
+                && !fonts_changed_p)
+           {
+             /* Is it always sure that the display agrees with lines in
+                the current matrix?  I don't think so, so we mark rows
+                displayed invalid in the current matrix by setting their
+                enabled_p flag to zero.  */
+             MATRIX_ROW (w->current_matrix, it.vpos)->enabled_p = 0;
+             if (display_line (&it))
+               last_text_row_at_end = it.glyph_row - 1;
+           }
        }
     }