diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 8ffec93e45d..7a89089958f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10064,8 +10064,20 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos | |||
| 10064 | if ((op & MOVE_TO_POS) != 0 | 10064 | if ((op & MOVE_TO_POS) != 0 |
| 10065 | && (IT_CHARPOS (*it) > to_charpos | 10065 | && (IT_CHARPOS (*it) > to_charpos |
| 10066 | || (IT_CHARPOS (*it) == to_charpos | 10066 | || (IT_CHARPOS (*it) == to_charpos |
| 10067 | /* Consider TO_CHARPOS as REACHED if we are at | ||
| 10068 | EOB that ends in something other than a newline. */ | ||
| 10067 | && to_charpos == ZV | 10069 | && to_charpos == ZV |
| 10068 | && (ZV_BYTE <= 1 || FETCH_BYTE (ZV_BYTE - 1) != '\n')))) | 10070 | && (ZV_BYTE <= 1 || FETCH_BYTE (ZV_BYTE - 1) != '\n') |
| 10071 | /* But if we have a display or an overlay string | ||
| 10072 | at EOB, keep going until we exhaust all the | ||
| 10073 | characters of the string(s). */ | ||
| 10074 | && (it->sp == 0 | ||
| 10075 | || (STRINGP (it->string) | ||
| 10076 | && (it->current.overlay_string_index < 0 | ||
| 10077 | || (it->current.overlay_string_index >= 0 | ||
| 10078 | && it->current.overlay_string_index | ||
| 10079 | >= it->n_overlay_strings - 1)) | ||
| 10080 | && IT_STRING_CHARPOS (*it) >= it->end_charpos))))) | ||
| 10069 | { | 10081 | { |
| 10070 | reached = 9; | 10082 | reached = 9; |
| 10071 | goto out; | 10083 | goto out; |