Merge pull request #125 from hlissner/patch-2

Fix matches segment mirroring across all buffers
This commit is contained in:
Vincent Zhang 2019-03-01 03:20:21 +07:00 committed by GitHub
commit 371c3fcfa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -935,7 +935,12 @@ lines are selected, or the NxM dimensions of a block selection."
(with-eval-after-load 'anzu (with-eval-after-load 'anzu
(add-hook 'isearch-mode-end-hook #'anzu--reset-status t) (add-hook 'isearch-mode-end-hook #'anzu--reset-status t)
(add-hook 'iedit-mode-end-hook #'anzu--reset-status) (add-hook 'iedit-mode-end-hook #'anzu--reset-status)
(advice-add #'evil-force-normal-state :after #'anzu--reset-status)) (advice-add #'evil-force-normal-state :after #'anzu--reset-status)
;; Fix matches segment mirroring across all buffers
(mapc #'make-variable-buffer-local
'(anzu--total-matched anzu--current-position anzu--state
anzu--cached-count anzu--cached-positions anzu--last-command
anzu--last-isearch-string anzu--overflow-p)))
(defsubst doom-modeline--anzu () (defsubst doom-modeline--anzu ()
"Show the match index and total number thereof. "Show the match index and total number thereof.