summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/isearch.el3
1 files changed, 2 insertions, 1 deletions
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?