5823 |
|
|
5824 |
move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS); |
move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS); |
5825 |
xassert (IT_CHARPOS (*it) >= BEGV); |
xassert (IT_CHARPOS (*it) >= BEGV); |
5826 |
|
/* H is the actual vertical distance from the position in *IT |
5827 |
|
and the starting position. */ |
5828 |
h = it2.current_y - it->current_y; |
h = it2.current_y - it->current_y; |
5829 |
|
/* NLINES is the distance in number of lines. */ |
5830 |
nlines = it2.vpos - it->vpos; |
nlines = it2.vpos - it->vpos; |
5831 |
|
|
5832 |
/* Correct IT's y and vpos position. */ |
/* Correct IT's y and vpos position |
5833 |
|
so that they are relative to the starting point. */ |
5834 |
it->vpos -= nlines; |
it->vpos -= nlines; |
5835 |
it->current_y -= h; |
it->current_y -= h; |
5836 |
|
|
5842 |
move_it_by_lines (it, nlines, 1); |
move_it_by_lines (it, nlines, 1); |
5843 |
xassert (IT_CHARPOS (*it) <= start_pos); |
xassert (IT_CHARPOS (*it) <= start_pos); |
5844 |
} |
} |
5845 |
else if (nlines) |
else |
5846 |
{ |
{ |
5847 |
/* The y-position we try to reach. Note that h has been |
/* The y-position we try to reach, relative to *IT. |
5848 |
subtracted in front of the if-statement. */ |
Note that H has been subtracted in front of the if-statement. */ |
5849 |
int target_y = it->current_y + h - dy; |
int target_y = it->current_y + h - dy; |
5850 |
int y0 = it3.current_y; |
int y0 = it3.current_y; |
5851 |
int y1 = line_bottom_y (&it3); |
int y1 = line_bottom_y (&it3); |
10003 |
/* Update the display. */ |
/* Update the display. */ |
10004 |
set_window_update_flags (XWINDOW (f->root_window), 1); |
set_window_update_flags (XWINDOW (f->root_window), 1); |
10005 |
pause |= update_frame (f, 0, 0); |
pause |= update_frame (f, 0, 0); |
10006 |
|
#if 0 /* Exiting the loop can leave the wrong value for buffer_shared. */ |
10007 |
if (pause) |
if (pause) |
10008 |
break; |
break; |
10009 |
|
#endif |
10010 |
|
|
10011 |
if (n == size) |
if (n == size) |
10012 |
{ |
{ |