]> git.eshelyaron.com Git - emacs.git/commitdiff
Always run 'isearch-lazy-count-update-hook' with point at match
authorAugusto Stoffel <arstoffel@gmail.com>
Fri, 25 Mar 2022 07:46:57 +0000 (08:46 +0100)
committerJuri Linkov <juri@linkov.net>
Sun, 27 Mar 2022 07:48:07 +0000 (10:48 +0300)
* 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

index 9b311cb49eac1e20dd69a6b56dfe024792693840..05a73edead7a4f0cc02ae900336d9e945df309ae 100644 (file)
@@ -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))))))
 
 \f
 ;; Reading from minibuffer with lazy highlight and match count