Fix computation of scroll-margin's character position in redisplay_window.
authorEli Zaretskii <eliz@gnu.org>
Fri, 2 Mar 2012 15:40:44 +0000 (17:40 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 2 Mar 2012 15:40:44 +0000 (17:40 +0200)
  src/xdisp.c (redisplay_window): Pass to move_it_vertically the margin in
 pixels, not in screen lines.

src/ChangeLog
src/xdisp.c

index 936ec6a..f0e4fa6 100644 (file)
@@ -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  <rgm@gnu.org>
 
index 810a75f..62d0d18 100644 (file)
@@ -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);
        }