changeset 32532:61d4de9a4e35

(try_scrolling) <cursor in scroll margin at the bottom>: Don't add in the last line's height when deciding if the new position is below the scroll margin.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 16 Oct 2000 13:56:12 +0000
parents 2555cdee2fed
children ec12d23c8eea
files src/xdisp.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Oct 16 13:04:34 2000 +0000
+++ b/src/xdisp.c	Mon Oct 16 13:56:12 2000 +0000
@@ -8594,7 +8594,7 @@
   int this_scroll_margin;
   int dy = 0;
   int scroll_max;
-  int line_height, rc;
+  int rc;
   int amount_to_scroll = 0;
   Lisp_Object aggressive;
   int height;
@@ -8649,6 +8649,9 @@
   if (PT >= CHARPOS (scroll_margin_pos))
     {
       int y0;
+#if 0
+      int line_height;
+#endif
       
       /* Point is in the scroll margin at the bottom of the window, or
 	 below.  Compute a new window start that makes point visible.  */
@@ -8659,10 +8662,14 @@
       y0 = it.current_y;
       move_it_to (&it, PT, 0, it.last_visible_y, -1,
 		  MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
+#if 0 /* Taking the line's height into account here looks wrong.  */
       line_height = (it.max_ascent + it.max_descent
 		     ? it.max_ascent + it.max_descent
 		     : last_height);
       dy = it.current_y + line_height - y0;
+#else
+      dy = it.current_y - y0;
+#endif
       
       if (dy > scroll_max)
 	return 0;