diff options
| author | Richard M. Stallman | 2002-03-30 23:49:39 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-03-30 23:49:39 +0000 |
| commit | e9b2c9617c85f827ce8362a755ebbd2d403eced3 (patch) | |
| tree | e1146a6b23dbbc1be3043a1c20ec3769bbff9412 /src/window.c | |
| parent | de70f8b64d01203eaa00ed98c0b155e6dc576a79 (diff) | |
| download | emacs-e9b2c9617c85f827ce8362a755ebbd2d403eced3.tar.gz emacs-e9b2c9617c85f827ce8362a755ebbd2d403eced3.zip | |
(window_scroll_pixel_based): Exit the move_it_by_lines
loop whenever it stops making progress.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index 2ea7cd1d6dd..3535e50673e 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4154,7 +4154,12 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4154 | in the scroll margin at the top. */ | 4154 | in the scroll margin at the top. */ |
| 4155 | move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); | 4155 | move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); |
| 4156 | while (it.current_y < this_scroll_margin) | 4156 | while (it.current_y < this_scroll_margin) |
| 4157 | move_it_by_lines (&it, 1, 1); | 4157 | { |
| 4158 | int prev = it.current_y; | ||
| 4159 | move_it_by_lines (&it, 1, 1); | ||
| 4160 | if (prev == it.current_y) | ||
| 4161 | break; | ||
| 4162 | } | ||
| 4158 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); | 4163 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); |
| 4159 | } | 4164 | } |
| 4160 | else if (n < 0) | 4165 | else if (n < 0) |