Mercurial > emacs
comparison src/xdisp.c @ 61991:9aeb4fcfe44d
(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.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Sun, 01 May 2005 21:42:34 +0000 |
parents | b3a3357502cd |
children | e0b1ba3bfcc9 |
comparison
equal
deleted
inserted
replaced
61990:82672fec921f | 61991:9aeb4fcfe44d |
---|---|
5875 | 5875 |
5876 while (1) | 5876 while (1) |
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 |
5883 explicitly below. */ | 5892 explicitly below. */ |
5884 if (!get_next_display_element (it) | 5893 if (!get_next_display_element (it) |