Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
44263:13c043393136 | 44264:6bcf9f9c10df |
---|---|
4152 { | 4152 { |
4153 /* We moved the window start towards ZV, so PT may be now | 4153 /* We moved the window start towards ZV, so PT may be now |
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) |
4161 { | 4166 { |
4162 int charpos, bytepos; | 4167 int charpos, bytepos; |