# HG changeset patch # User Kim F. Storm # Date 1106441424 0 # Node ID 75b50deae4e97a774f32f0d50b1ba9f78aaac010 # Parent 18054edb344f04b6d112c8591b1c969549f66c94 (window_scroll_pixel_based): Force moving to next line if scrolling doesn't move start point, e.g. if looking at tall image. diff -r 18054edb344f -r 75b50deae4e9 src/window.c --- a/src/window.c Sun Jan 23 00:01:51 2005 +0000 +++ b/src/window.c Sun Jan 23 00:50:24 2005 +0000 @@ -4628,8 +4628,16 @@ if (dy <= 0) move_it_vertically_backward (&it, -dy); else if (dy > 0) - move_it_to (&it, ZV, -1, it.current_y + dy, -1, - MOVE_TO_POS | MOVE_TO_Y); + { + int start_pos = IT_CHARPOS (it); + move_it_to (&it, ZV, -1, it.current_y + dy, -1, + MOVE_TO_POS | MOVE_TO_Y); + /* Ensure we actually does move, e.g. in case we are currently + looking at an image that is taller that the window height. */ + while (start_pos == IT_CHARPOS (it) + && start_pos < ZV) + move_it_by_lines (&it, 1, 1); + } } else move_it_by_lines (&it, n, 1);