mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-27 07:41:28 -08:00
(window_scroll_pixel_based): Force moving to next line
if scrolling doesn't move start point, e.g. if looking at tall image.
This commit is contained in:
parent
e1c7e69af9
commit
bed83ee4dd
1 changed files with 10 additions and 2 deletions
12
src/window.c
12
src/window.c
|
|
@ -4628,8 +4628,16 @@ window_scroll_pixel_based (window, n, whole, noerror)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue