summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorAugusto Stoffel <arstoffel@gmail.com>2022-03-25 08:46:57 +0100
committerJuri Linkov <juri@linkov.net>2022-03-27 10:48:07 +0300
commitd361144f61198fbc914472d6e0714371178b33ec (patch)
treec5ae06e55a9bb95aaf6b4be005b254d93bd865f9 /lisp/isearch.el
parentef94f325577d5eda968b9f22ff2a4a19f7943b10 (diff)
downloademacs-d361144f61198fbc914472d6e0714371178b33ec.tar.gz
Always run 'isearch-lazy-count-update-hook' with point at match
* lisp/isearch.el (isearch-lazy-highlight-buffer-update): Run 'isearch-lazy-count-update-hook' outside of save-excursion, so point is at the current match.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9b311cb49ea..05a73edead7 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4342,11 +4342,12 @@ Attempt to do the search exactly the way the pending Isearch would."
(setq isearch-lazy-count-current
(gethash opoint isearch-lazy-count-hash 0))
(when (and isearch-mode (null isearch-message-function))
- (isearch-message))
- (run-hooks 'lazy-count-update-hook))
+ (isearch-message)))
(setq isearch-lazy-highlight-timer
(run-at-time lazy-highlight-interval nil
- 'isearch-lazy-highlight-buffer-update)))))))))
+ 'isearch-lazy-highlight-buffer-update)))))
+ (when (and nomore isearch-lazy-count)
+ (run-hooks 'lazy-count-update-hook))))))
;; Reading from minibuffer with lazy highlight and match count