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

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

[nongnu] elpa/anzu 4cfbddbc07 020/288: Reset match count variables in is


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 4cfbddbc07 020/288: Reset match count variables in isearch-mode-end-hook
Date: Thu, 6 Jan 2022 03:58:35 -0500 (EST)

branch: elpa/anzu
commit 4cfbddbc0744d4ac84c8b89ad558cf87c7b43420
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    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

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