mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Merge pull request #128 from hlissner/patch-4
Fix matches segment mirroring across all buffers (part 2)
This commit is contained in:
commit
c901459d9d
1 changed files with 7 additions and 2 deletions
|
@ -938,7 +938,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.
|
||||||
|
@ -950,7 +955,7 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||||
(let ((here anzu--current-position)
|
(let ((here anzu--current-position)
|
||||||
(total anzu--total-matched))
|
(total anzu--total-matched))
|
||||||
(cond ((eq anzu--state 'replace-query)
|
(cond ((eq anzu--state 'replace-query)
|
||||||
(format " %d replace " total))
|
(format " %d replace " anzu--cached-count))
|
||||||
((eq anzu--state 'replace)
|
((eq anzu--state 'replace)
|
||||||
(format " %d/%d " here total))
|
(format " %d/%d " here total))
|
||||||
(anzu--overflow-p
|
(anzu--overflow-p
|
||||||
|
|
Loading…
Reference in a new issue