5649 |
{ |
{ |
5650 |
int x, i, ascent = 0, descent = 0; |
int x, i, ascent = 0, descent = 0; |
5651 |
|
|
5652 |
/* Stop when ZV or TO_CHARPOS reached. */ |
/* Stop when ZV reached. |
5653 |
|
We used to stop here when TO_CHARPOS reached as well, but that is |
5654 |
|
too soon if this glyph does not fit on this line. So we handle it |
5655 |
|
explicitly below. */ |
5656 |
if (!get_next_display_element (it) |
if (!get_next_display_element (it) |
5657 |
|| BUFFER_POS_REACHED_P ()) |
|| (it->truncate_lines_p |
5658 |
|
&& BUFFER_POS_REACHED_P ())) |
5659 |
{ |
{ |
5660 |
result = MOVE_POS_MATCH_OR_ZV; |
result = MOVE_POS_MATCH_OR_ZV; |
5661 |
break; |
break; |
5715 |
/* We want to leave anything reaching TO_X to the caller. */ |
/* We want to leave anything reaching TO_X to the caller. */ |
5716 |
if ((op & MOVE_TO_X) && new_x > to_x) |
if ((op & MOVE_TO_X) && new_x > to_x) |
5717 |
{ |
{ |
5718 |
|
if (BUFFER_POS_REACHED_P ()) |
5719 |
|
goto buffer_pos_reached; |
5720 |
it->current_x = x; |
it->current_x = x; |
5721 |
result = MOVE_X_REACHED; |
result = MOVE_X_REACHED; |
5722 |
break; |
break; |
5778 |
result = MOVE_LINE_CONTINUED; |
result = MOVE_LINE_CONTINUED; |
5779 |
break; |
break; |
5780 |
} |
} |
5781 |
|
else if (BUFFER_POS_REACHED_P ()) |
5782 |
|
goto buffer_pos_reached; |
5783 |
else if (new_x > it->first_visible_x) |
else if (new_x > it->first_visible_x) |
5784 |
{ |
{ |
5785 |
/* Glyph is visible. Increment number of glyphs that |
/* Glyph is visible. Increment number of glyphs that |
5796 |
if (result != MOVE_UNDEFINED) |
if (result != MOVE_UNDEFINED) |
5797 |
break; |
break; |
5798 |
} |
} |
5799 |
|
else if (BUFFER_POS_REACHED_P ()) |
5800 |
|
{ |
5801 |
|
buffer_pos_reached: |
5802 |
|
it->current_x = x; |
5803 |
|
it->max_ascent = ascent; |
5804 |
|
it->max_descent = descent; |
5805 |
|
result = MOVE_POS_MATCH_OR_ZV; |
5806 |
|
break; |
5807 |
|
} |
5808 |
else if ((op & MOVE_TO_X) && it->current_x >= to_x) |
else if ((op & MOVE_TO_X) && it->current_x >= to_x) |
5809 |
{ |
{ |
5810 |
/* Stop when TO_X specified and reached. This check is |
/* Stop when TO_X specified and reached. This check is |