emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/isearch-mb dc603a9 03/20: Lazily highlight the whole bu


From: Stefan Monnier
Subject: [elpa] externals/isearch-mb dc603a9 03/20: Lazily highlight the whole buffer, to avoid missing overlays
Date: Sun, 16 May 2021 17:21:12 -0400 (EDT)

branch: externals/isearch-mb
commit dc603a9a0be6b514e8c1c707c19ab0cdacebfcd9
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>

    Lazily highlight the whole buffer, to avoid missing overlays
---
 isearch-mb.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/isearch-mb.el b/isearch-mb.el
index 6bb39b9..6ccb127 100644
--- a/isearch-mb.el
+++ b/isearch-mb.el
@@ -51,8 +51,7 @@
           (goto-char isearch-barrier)
           (setq isearch-adjusted t)
           (setq isearch-success t)
-          (isearch-search-and-update))
-        )))
+          (isearch-search-and-update)))))
   (set-text-properties (minibuffer-prompt-end) (point-max) nil)
   (when-let ((fail-pos (isearch-fail-pos)))
     (add-text-properties (+ (minibuffer-prompt-end) fail-pos)
@@ -103,7 +102,12 @@
   "Advice to make `isearch-mode' read from the minibuffer."
   (interactive)
   (let ((isearch-mode-map nil)
-        (history-add-new-input nil))
+        (history-add-new-input nil)
+        ;; We need to set `inhibit-redisplay' at certain points to
+        ;; avoid flicker.  As a side effect, window-start/end in
+        ;; `isearch-lazy-highlight-update' will have incorrect values,
+        ;; so we need to lazy-highlight the whole buffer.
+        (lazy-highlight-buffer (not (null isearch-lazy-highlight))))
   (unwind-protect
       (progn
         (apply fn args)



reply via email to

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