comparison src/xdisp.c @ 50744:13cae05372c0

(move_it_vertically_backward): Do the final big else even if nlines is 0. (redisplay_internal): Finish the per-frame loop even if redisplay is suspended by input.
author Richard M. Stallman <rms@gnu.org>
date Wed, 30 Apr 2003 12:03:53 +0000
parents d0877472b39e
children ee3ba06bba1a
comparison
equal deleted inserted replaced
50743:03920300bdbf 50744:13cae05372c0
5821 xassert (IT_CHARPOS (*it) >= BEGV); 5821 xassert (IT_CHARPOS (*it) >= BEGV);
5822 it3 = it2; 5822 it3 = it2;
5823 5823
5824 move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS); 5824 move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS);
5825 xassert (IT_CHARPOS (*it) >= BEGV); 5825 xassert (IT_CHARPOS (*it) >= BEGV);
5826 /* H is the actual vertical distance from the position in *IT
5827 and the starting position. */
5826 h = it2.current_y - it->current_y; 5828 h = it2.current_y - it->current_y;
5829 /* NLINES is the distance in number of lines. */
5827 nlines = it2.vpos - it->vpos; 5830 nlines = it2.vpos - it->vpos;
5828 5831
5829 /* Correct IT's y and vpos position. */ 5832 /* Correct IT's y and vpos position
5833 so that they are relative to the starting point. */
5830 it->vpos -= nlines; 5834 it->vpos -= nlines;
5831 it->current_y -= h; 5835 it->current_y -= h;
5832 5836
5833 if (dy == 0) 5837 if (dy == 0)
5834 { 5838 {
5836 value of nlines is > 0 if continuation lines were involved. */ 5840 value of nlines is > 0 if continuation lines were involved. */
5837 if (nlines > 0) 5841 if (nlines > 0)
5838 move_it_by_lines (it, nlines, 1); 5842 move_it_by_lines (it, nlines, 1);
5839 xassert (IT_CHARPOS (*it) <= start_pos); 5843 xassert (IT_CHARPOS (*it) <= start_pos);
5840 } 5844 }
5841 else if (nlines) 5845 else
5842 { 5846 {
5843 /* The y-position we try to reach. Note that h has been 5847 /* The y-position we try to reach, relative to *IT.
5844 subtracted in front of the if-statement. */ 5848 Note that H has been subtracted in front of the if-statement. */
5845 int target_y = it->current_y + h - dy; 5849 int target_y = it->current_y + h - dy;
5846 int y0 = it3.current_y; 5850 int y0 = it3.current_y;
5847 int y1 = line_bottom_y (&it3); 5851 int y1 = line_bottom_y (&it3);
5848 int line_height = y1 - y0; 5852 int line_height = y1 - y0;
5849 5853
9997 STOP_POLLING; 10001 STOP_POLLING;
9998 10002
9999 /* Update the display. */ 10003 /* Update the display. */
10000 set_window_update_flags (XWINDOW (f->root_window), 1); 10004 set_window_update_flags (XWINDOW (f->root_window), 1);
10001 pause |= update_frame (f, 0, 0); 10005 pause |= update_frame (f, 0, 0);
10006 #if 0 /* Exiting the loop can leave the wrong value for buffer_shared. */
10002 if (pause) 10007 if (pause)
10003 break; 10008 break;
10009 #endif
10004 10010
10005 if (n == size) 10011 if (n == size)
10006 { 10012 {
10007 int nbytes = size * sizeof *updated; 10013 int nbytes = size * sizeof *updated;
10008 struct frame **p = (struct frame **) alloca (2 * nbytes); 10014 struct frame **p = (struct frame **) alloca (2 * nbytes);