diff options
| author | Eli Zaretskii | 2021-02-13 17:27:02 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2021-02-13 17:27:02 +0200 |
| commit | 56c42bd28d9be400e37e122b7abebcd980ea0e8b (patch) | |
| tree | a366372a9507a0445a02816ce1afb74f8e163815 | |
| parent | c535fe647c02ccde424340dc8ceae75922443ca5 (diff) | |
| download | emacs-56c42bd28d9be400e37e122b7abebcd980ea0e8b.tar.gz emacs-56c42bd28d9be400e37e122b7abebcd980ea0e8b.zip | |
Fix I-search at EOB when long lines are truncated
* src/xdisp.c (move_it_to): Fix logic when TO_CHARPOS is at the
end of an hscrolled line which ends at EOB. (Bug#46316)
| -rw-r--r-- | src/xdisp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 125d3ed7f0f..a1956824214 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -10049,7 +10049,9 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int to_x, int to_y, int to_vpos | |||
| 10049 | it->continuation_lines_width = 0; | 10049 | it->continuation_lines_width = 0; |
| 10050 | reseat_at_next_visible_line_start (it, false); | 10050 | reseat_at_next_visible_line_start (it, false); |
| 10051 | if ((op & MOVE_TO_POS) != 0 | 10051 | if ((op & MOVE_TO_POS) != 0 |
| 10052 | && IT_CHARPOS (*it) > to_charpos) | 10052 | && (IT_CHARPOS (*it) > to_charpos |
| 10053 | || (IT_CHARPOS (*it) == to_charpos | ||
| 10054 | && to_charpos == ZV))) | ||
| 10053 | { | 10055 | { |
| 10054 | reached = 9; | 10056 | reached = 9; |
| 10055 | goto out; | 10057 | goto out; |