Refactor anzu--reset-status hooks

This commit is contained in:
Henrik Lissner 2017-05-25 12:12:38 +02:00
parent 6b5f0af985
commit 733042cb7f

View file

@ -48,11 +48,9 @@
anzu--cached-count anzu--cached-positions anzu--last-command anzu--cached-count anzu--cached-positions anzu--last-command
anzu--last-isearch-string anzu--overflow-p)) anzu--last-isearch-string anzu--overflow-p))
(defun +doom-modeline|reset-anzu ()
(anzu--reset-status))
;; Ensure anzu state is cleared when searches & iedit are done ;; Ensure anzu state is cleared when searches & iedit are done
(add-hook! :append '(kill-buffer isearch-mode-end +evil-esc-hook) (add-hook! :append '(isearch-mode-end-hook +evil-esc-hook)
#'+doom-modeline|reset-anzu) #'anzu--reset-status)
(after! iedit (after! iedit
(add-hook 'iedit-mode-end-hook #'+doom-modeline|reset-anzu))) (add-hook 'iedit-mode-end-hook #'+doom-modeline|reset-anzu)))