From 82e274d1d414051fe639a9f304fe8ce3a65f42ee Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 30 Oct 2000 16:25:15 +0000 Subject: [PATCH] (try_scrolling) = scroll_margin_pos>: Add 1 to the dy obtained from the iterator's y-position after moving from scroll_margin_pos to PT; see comment there. --- src/ChangeLog | 4 ++++ src/xdisp.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index df639a2c8f3..8a12115d442 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2000-10-30 Gerd Moellmann + * xdisp.c (try_scrolling) = scroll_margin_pos>: Add 1 to the + dy obtained from the iterator's y-position after moving from + scroll_margin_pos to PT; see comment there. + * xdisp.c (safe_eval_handler): Call add_to_log. * xfaces.c (resolve_face_name): Handle case that FACE_NAME diff --git a/src/xdisp.c b/src/xdisp.c index 3cce1e6bad9..ce6f5000927 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -8768,7 +8768,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, : last_height); dy = it.current_y + line_height - y0; #else - dy = it.current_y - y0; + /* With a scroll_margin of 0, scroll_margin_pos is at the window + end, which is one line below the window. The iterator's + current_y will be same as y0 in that case, but we have to + scroll a line to make PT visible. That's the reason why 1 is + added below. */ + dy = 1 + it.current_y - y0; #endif if (dy > scroll_max) -- 2.39.5