emacs-diffs
[Top][All Lists]
Advanced

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

master 3021ecd: Fix Isearch hscrolling in a corner case


From: Eli Zaretskii
Subject: master 3021ecd: Fix Isearch hscrolling in a corner case
Date: Thu, 22 Apr 2021 07:02:51 -0400 (EDT)

branch: master
commit 3021ecdedd3883911ca2db2357311f7fecdbd667
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix Isearch hscrolling in a corner case
    
    * lisp/isearch.el (isearch-update): When we start hscrolled,
    consider also the case that point ends up being to the left of the
    hscrolled window's edge.  (Bug#46316)
---
 lisp/isearch.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index f1c61fc..9f3cfd7 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1374,7 +1374,8 @@ The last thing is to trigger a new round of lazy 
highlighting."
                    ;; the X coordinate it returns is 1 pixel beyond
                    ;; the last visible one.
                    (>= (car visible-p)
-                        (* (window-max-chars-per-line) (frame-char-width))))
+                        (* (window-max-chars-per-line) (frame-char-width)))
+                    (< (car visible-p) 0))
                (set-window-hscroll (selected-window) current-scroll))))
        (if isearch-other-end
             (if (< isearch-other-end (point)) ; isearch-forward?



reply via email to

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