From 3e441275a89ba751d227b514981ccb413034b3bb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 2 Mar 2012 17:40:44 +0200 Subject: [PATCH] Fix computation of scroll-margin's character position in redisplay_window. src/xdisp.c (redisplay_window): Pass to move_it_vertically the margin in pixels, not in screen lines. --- src/ChangeLog | 2 ++ src/xdisp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 936ec6a3a1f..f0e4fa62175 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,8 @@ position past the first glyph_row that ends at ZV. (Bug#10902) (redisplay_window, next_element_from_string): Fix typos in comments. + (redisplay_window): Pass to move_it_vertically the margin in + pixels, not in screen lines. 2012-03-02 Glenn Morris diff --git a/src/xdisp.c b/src/xdisp.c index 810a75fec5d..62d0d187a19 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15611,7 +15611,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) SAVE_IT (it1, it, it1data); start_display (&it1, w, startp); - move_it_vertically (&it1, margin); + move_it_vertically (&it1, margin * FRAME_LINE_HEIGHT (f)); margin_pos = IT_CHARPOS (it1); RESTORE_IT (&it, &it, it1data); } -- 2.39.2