From d361144f61198fbc914472d6e0714371178b33ec Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Fri, 25 Mar 2022 08:46:57 +0100 Subject: [PATCH] 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. --- lisp/isearch.el | 7 ++++--- 1 file 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 -- 2.39.2