# HG changeset patch # User Gerd Moellmann # Date 986917193 0 # Node ID 8381b1ef7f3a4e9f998c0cf940464211599eb664 # Parent 9ca19dfc32fb23524cd4314680ca0e7360da9a57 (window_scroll_pixel_based, Frecenter): Call window_box_height instead of using it.last_visible_y for the height of the window. diff -r 9ca19dfc32fb -r 8381b1ef7f3a src/window.c --- a/src/window.c Tue Apr 10 15:17:09 2001 +0000 +++ b/src/window.c Tue Apr 10 15:39:53 2001 +0000 @@ -3969,7 +3969,7 @@ results for variable height lines. */ init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); it.current_y = it.last_visible_y; - move_it_vertically (&it, -it.last_visible_y / 2); + move_it_vertically (&it, - window_box_height (w) / 2); /* The function move_iterator_vertically may move over more than the specified y-distance. If it->w is small, e.g. a @@ -4002,7 +4002,7 @@ start_display (&it, w, start); if (whole) { - int screen_full = (it.last_visible_y + int screen_full = (window_box_height (w) - next_screen_context_lines * CANON_Y_UNIT (it.f)); int direction = n < 0 ? -1 : 1; int dy = direction * screen_full; @@ -4583,7 +4583,7 @@ SET_TEXT_POS (pt, PT, PT_BYTE); start_display (&it, w, pt); - move_it_vertically (&it, - it.last_visible_y / 2); + move_it_vertically (&it, - window_box_height (w) / 2); charpos = IT_CHARPOS (it); bytepos = IT_BYTEPOS (it); }