]> git.eshelyaron.com Git - emacs.git/commitdiff
(try_window_id) <all changes below window end>: Don't
authorGerd Moellmann <gerd@gnu.org>
Mon, 25 Jun 2001 11:13:57 +0000 (11:13 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 25 Jun 2001 11:13:57 +0000 (11:13 +0000)
take this shortcut if ZV is visible in the window.
(try_window_id): When checking for window start being in changed
text, don't check that the buffer's size has changed.

src/ChangeLog
src/xdisp.c

index f9146af8e9481040ad664464981df27009c71c1d..732dcbd3edfe50387d5429b6e30cd11d31e42a6b 100644 (file)
@@ -1,3 +1,10 @@
+2001-06-25  Gerd Moellmann  <gerd@gnu.org>
+
+       * xdisp.c (try_window_id) <all changes below window end>: Don't
+       take this shortcut if ZV is visible in the window.
+       (try_window_id): When checking for window start being in changed
+       text, don't check that the buffer's size has changed.
+
 2001-06-23  Richard M. Stallman  <rms@gnu.org>
 
        * minibuf.c (Fcompleting_read): Doc fix.
index 1133197878e4e2085ea7ae39999c41e80cdf3404..28208b32cab2f2af23fe5d0159a3d806b641ea15 100644 (file)
@@ -11226,14 +11226,12 @@ try_window_id (w)
     }
 
   /* Handle the case that changes are all below what is displayed in
-     the window, and that PT is in the window.
-     RMS: This used to use >=, but that was spuriously true
-     when inserting at the end of buffer when the end of buffer
-     was visible on the screen.  I think it is safe now,
-     because the test now insists there is a character between the end of
-     the last screen row used and the first change, and that character
-     must not off the bottom of the screen.  */
-  if (first_changed_charpos > MATRIX_ROW_END_CHARPOS (row))
+     the window, and that PT is in the window.  This short cut cannot
+     be taken if ZV is visible in the window, and text has been added
+     there that is visible in the window.  */
+  if (first_changed_charpos >= MATRIX_ROW_END_CHARPOS (row)
+      /* ZV is not visible in the window.  */
+      && current_matrix->zv > MATRIX_ROW_END_CHARPOS (row))
     {
       struct glyph_row *r0;
 
@@ -11263,12 +11261,14 @@ try_window_id (w)
        }
     }
 
-  /* Give up if window start is in the changed area
-     if the total size has changed.  */
-  /* RMS: Is it really relevant whether the total size has changed?
-     Why should that matter?  */
-  if (BEG_UNCHANGED + END_UNCHANGED != Z - BEG
-      && CHARPOS (start) >= first_changed_charpos
+  /* Give up if window start is in the changed area.
+     
+     The condition used to read
+
+     (BEG_UNCHANGED + END_UNCHANGED != Z - BEG && ...)
+
+     but why that was tested escapes me at the moment.  */
+  if (CHARPOS (start) >= first_changed_charpos
       && CHARPOS (start) <= last_changed_charpos)
     GIVE_UP (15);