branch: elpa/anzu
commit 4cfbddbc0744d4ac84c8b89ad558cf87c7b43420
Author: Syohei YOSHIDA <[email protected]>
Commit: Syohei YOSHIDA <[email protected]>

    Reset match count variables in isearch-mode-end-hook
---
 anzu.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/anzu.el b/anzu.el
index 0e332dc5dd..6232b8acb4 100644
--- a/anzu.el
+++ b/anzu.el
@@ -127,7 +127,12 @@
     (setq mode-line-format (cons '(:eval (anzu--update-mode-line))
                                  mode-line-format))))
 
+(defsubst anzu--reset-count ()
+  (setq anzu--total-matched 0
+        anzu--current-posion 0))
+
 (defun anzu--reset-mode-line ()
+  (anzu--reset-count)
   (when (and anzu-cons-mode-line-p (anzu--mode-line-not-set-p))
     (setq mode-line-format (cdr mode-line-format))))
 

Reply via email to