From 197a6bcc20cecba40b56ae478d42a33eb1e19d57 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 8 Oct 2016 12:35:17 +0300 Subject: [PATCH] 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) --- lisp/isearch.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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? -- 2.39.5