# HG changeset patch # User Gerd Moellmann # Date 971704572 0 # Node ID 61d4de9a4e35888776c29250dce332ff4b71e114 # Parent 2555cdee2fed60fa44ca23a76cdcbc84ae4b4dc6 (try_scrolling) : Don't add in the last line's height when deciding if the new position is below the scroll margin. diff -r 2555cdee2fed -r 61d4de9a4e35 src/xdisp.c --- 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;