(displayed_window_lines): Detect partially
authorGerd Moellmann <gerd@gnu.org>
Mon, 6 Nov 2000 15:48:27 +0000 (15:48 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 6 Nov 2000 15:48:27 +0000 (15:48 +0000)
visible lines at the bottom correctly.

src/ChangeLog
src/window.c

index 728d0f5..e49e7b3 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-06  Gerd Moellmann  <gerd@gnu.org>
+
+       * window.c (displayed_window_lines): Detect partially
+       visible lines at the bottom correctly.
+
 2000-11-06  Stefan Monnier  <monnier@cs.yale.edu>
 
        * fileio.c (Fwrite_region): Use `visiting' rather than `visit'
index 12b1542..4a4feca 100644 (file)
@@ -4351,7 +4351,8 @@ displayed_window_lines (w)
       int lines = (rest + CANON_Y_UNIT (f) - 1) / CANON_Y_UNIT (f);
       it.vpos += lines;
     }
-  else if (bottom_y > height)
+  else if (it.current_y < height && bottom_y > height)
+    /* Partially visible line at the bottom.  */
     ++it.vpos;
   
   return it.vpos;