From: Eli Zaretskii Date: Sat, 8 Oct 2016 09:35:17 +0000 (+0300) Subject: Fix horizontal scrolling during Isearch X-Git-Tag: emacs-25.1.90~138 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=197a6bc;p=emacs.git Fix horizontal scrolling during Isearch * lisp/isearch.el (isearch-update): Compute the window's body width in a way that is correct when there are no fringes. (Bug#24584) --- diff --git a/lisp/isearch.el b/lisp/isearch.el index 9df7627fa7c..01819510a6f 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -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?