mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
(move_it_in_display_line_to): Stop if we move beyond TO_CHARPOS.
This may happen if last glyphs was an image or stretch glyph.
This commit is contained in:
parent
bec0b76869
commit
20b44bb85a
1 changed files with 9 additions and 0 deletions
|
|
@ -5877,6 +5877,15 @@ move_it_in_display_line_to (it, to_charpos, to_x, op)
|
|||
{
|
||||
int x, i, ascent = 0, descent = 0;
|
||||
|
||||
/* Stop if we move beyond TO_CHARPOS (after an image or stretch glyph). */
|
||||
if ((op & MOVE_TO_POS) != 0
|
||||
&& BUFFERP (it->object)
|
||||
&& IT_CHARPOS (*it) > to_charpos)
|
||||
{
|
||||
result = MOVE_POS_MATCH_OR_ZV;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Stop when ZV reached.
|
||||
We used to stop here when TO_CHARPOS reached as well, but that is
|
||||
too soon if this glyph does not fit on this line. So we handle it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue