diff options
| author | Eli Zaretskii | 2020-04-18 16:29:33 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2020-04-18 16:29:33 +0300 |
| commit | d345c718cef69bf32deecc7bf790c6595e8aae8c (patch) | |
| tree | 6f55345787cbbecde726a00f5a4e3bf63bace15e /src | |
| parent | 13210712a06a53031cfb82ec5dc0ab5f8e720668 (diff) | |
| download | emacs-d345c718cef69bf32deecc7bf790c6595e8aae8c.tar.gz emacs-d345c718cef69bf32deecc7bf790c6595e8aae8c.zip | |
Safeguard the fix of bug#40632
* src/xdisp.c (move_it_to): Restrict the recent fix to iteration
through buffer text.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index abbe882649a..01f272033e5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -9898,9 +9898,13 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos | |||
| 9898 | This could happen when the first display element is | 9898 | This could happen when the first display element is |
| 9899 | wider than the window, or if we have a wrap-prefix | 9899 | wider than the window, or if we have a wrap-prefix |
| 9900 | that doesn't leave enough space after it to display | 9900 | that doesn't leave enough space after it to display |
| 9901 | even a single character. */ | 9901 | even a single character. We only do this for moving |
| 9902 | through buffer text, as with display/overlay strings | ||
| 9903 | we'd need to also compare it->object's, and this is | ||
| 9904 | unlikely to happen in that case anyway. */ | ||
| 9902 | if (IT_CHARPOS (*it) == orig_charpos | 9905 | if (IT_CHARPOS (*it) == orig_charpos |
| 9903 | && it->method == orig_method) | 9906 | && it->method == orig_method |
| 9907 | && orig_method == GET_FROM_BUFFER) | ||
| 9904 | set_iterator_to_next (it, false); | 9908 | set_iterator_to_next (it, false); |
| 9905 | it->continuation_lines_width += it->current_x; | 9909 | it->continuation_lines_width += it->current_x; |
| 9906 | } | 9910 | } |