aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2005-01-23 00:50:24 +0000
committerKim F. Storm2005-01-23 00:50:24 +0000
commitbed83ee4dd0caeb301232cf56dcc8e7f62406bba (patch)
treeabd85daafbb9e83cdb022daa691b2a4210b71dc2
parente1c7e69af9ed3532f78ad5716ea30a7f3d9aea77 (diff)
downloademacs-bed83ee4dd0caeb301232cf56dcc8e7f62406bba.tar.gz
emacs-bed83ee4dd0caeb301232cf56dcc8e7f62406bba.zip
(window_scroll_pixel_based): Force moving to next line
if scrolling doesn't move start point, e.g. if looking at tall image.
-rw-r--r--src/window.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/window.c b/src/window.c
index 85376dd7b50..ef3d38c1554 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4628,8 +4628,16 @@ window_scroll_pixel_based (window, n, whole, noerror)
4628 if (dy <= 0) 4628 if (dy <= 0)
4629 move_it_vertically_backward (&it, -dy); 4629 move_it_vertically_backward (&it, -dy);
4630 else if (dy > 0) 4630 else if (dy > 0)
4631 move_it_to (&it, ZV, -1, it.current_y + dy, -1, 4631 {
4632 MOVE_TO_POS | MOVE_TO_Y); 4632 int start_pos = IT_CHARPOS (it);
4633 move_it_to (&it, ZV, -1, it.current_y + dy, -1,
4634 MOVE_TO_POS | MOVE_TO_Y);
4635 /* Ensure we actually does move, e.g. in case we are currently
4636 looking at an image that is taller that the window height. */
4637 while (start_pos == IT_CHARPOS (it)
4638 && start_pos < ZV)
4639 move_it_by_lines (&it, 1, 1);
4640 }
4633 } 4641 }
4634 else 4642 else
4635 move_it_by_lines (&it, n, 1); 4643 move_it_by_lines (&it, n, 1);