emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 56c42bd: Fix I-search at EOB when long lines are truncated


From: Eli Zaretskii
Subject: master 56c42bd: Fix I-search at EOB when long lines are truncated
Date: Sat, 13 Feb 2021 10:27:57 -0500 (EST)

branch: master
commit 56c42bd28d9be400e37e122b7abebcd980ea0e8b
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 src/xdisp.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 125d3ed..a195682 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
          it->continuation_lines_width = 0;
          reseat_at_next_visible_line_start (it, false);
          if ((op & MOVE_TO_POS) != 0
-             && IT_CHARPOS (*it) > to_charpos)
+             && (IT_CHARPOS (*it) > to_charpos
+                 || (IT_CHARPOS (*it) == to_charpos
+                     && to_charpos == ZV)))
            {
              reached = 9;
              goto out;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]