Mercurial > emacs
diff src/window.c @ 44264:6bcf9f9c10df
(window_scroll_pixel_based): Exit the move_it_by_lines
loop whenever it stops making progress.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sat, 30 Mar 2002 23:49:39 +0000 |
| parents | d94cb7b3b165 |
| children | ee637a721e86 |
line wrap: on
line diff
--- a/src/window.c Sat Mar 30 23:48:04 2002 +0000 +++ b/src/window.c Sat Mar 30 23:49:39 2002 +0000 @@ -4154,7 +4154,12 @@ in the scroll margin at the top. */ move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); while (it.current_y < this_scroll_margin) - move_it_by_lines (&it, 1, 1); + { + int prev = it.current_y; + move_it_by_lines (&it, 1, 1); + if (prev == it.current_y) + break; + } SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); } else if (n < 0)
