aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-05-01 21:42:34 +0000
committerKim F. Storm2005-05-01 21:42:34 +0000
commit20b44bb85a371689df831747244dde427dbfa52b (patch)
treeba5e2cbac517e5173aea8850386ccf62f61f476d /src
parentbec0b768694180802a832c870af052dec0ac27b3 (diff)
downloademacs-20b44bb85a371689df831747244dde427dbfa52b.tar.gz
emacs-20b44bb85a371689df831747244dde427dbfa52b.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 19323ffa6d5..80b2981c5be 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5877,6 +5877,15 @@ move_it_in_display_line_to (it, to_charpos, to_x, op)
5877 { 5877 {
5878 int x, i, ascent = 0, descent = 0; 5878 int x, i, ascent = 0, descent = 0;
5879 5879
5880 /* Stop if we move beyond TO_CHARPOS (after an image or stretch glyph). */
5881 if ((op & MOVE_TO_POS) != 0
5882 && BUFFERP (it->object)
5883 && IT_CHARPOS (*it) > to_charpos)
5884 {
5885 result = MOVE_POS_MATCH_OR_ZV;
5886 break;
5887 }
5888
5880 /* Stop when ZV reached. 5889 /* Stop when ZV reached.
5881 We used to stop here when TO_CHARPOS reached as well, but that is 5890 We used to stop here when TO_CHARPOS reached as well, but that is
5882 too soon if this glyph does not fit on this line. So we handle it 5891 too soon if this glyph does not fit on this line. So we handle it