]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix horizontal scrolling during Isearch
authorEli Zaretskii <eliz@gnu.org>
Sat, 8 Oct 2016 09:35:17 +0000 (12:35 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 8 Oct 2016 09:35:17 +0000 (12:35 +0300)
* lisp/isearch.el (isearch-update): Compute the window's body
width in a way that is correct when there are no fringes.
(Bug#24584)

lisp/isearch.el

index 9df7627fa7ccf52ddf94a1e8e20053539b322d34..01819510a6f19ef19deefb9f8d6a5268697d81fe 100644 (file)
@@ -1012,7 +1012,8 @@ The last thing is to trigger a new round of lazy highlighting."
                    ;; pos-visible-in-window-group-p returns non-nil, but
                    ;; the X coordinate it returns is 1 pixel beyond
                    ;; the last visible one.
-                   (>= (car visible-p) (window-body-width nil t)))
+                   (>= (car visible-p)
+                        (* (window-max-chars-per-line) (frame-char-width))))
                (set-window-hscroll (selected-window) current-scroll))))
        (if isearch-other-end
             (if (< isearch-other-end (point)) ; isearch-forward?