mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Fix: incorrect anzu display.
This commit is contained in:
parent
aee0ad0994
commit
74c84537bd
1 changed files with 17 additions and 17 deletions
|
@ -324,8 +324,8 @@ If STRICT-P, return nil if no project was found, otherwise return
|
||||||
|
|
||||||
;; anzu and evil-anzu expose current/total state that can be displayed in the
|
;; anzu and evil-anzu expose current/total state that can be displayed in the
|
||||||
;; mode-line.
|
;; mode-line.
|
||||||
(when (featurep 'anzu)
|
|
||||||
(defun doom-modeline-fix-anzu-count (positions here)
|
(defun doom-modeline-fix-anzu-count (positions here)
|
||||||
|
"Calulate anzu counts via POSITIONS and HERE."
|
||||||
(cl-loop for (start . end) in positions
|
(cl-loop for (start . end) in positions
|
||||||
collect t into before
|
collect t into before
|
||||||
when (and (>= here start) (<= here end))
|
when (and (>= here start) (<= here end))
|
||||||
|
@ -341,9 +341,9 @@ If STRICT-P, return nil if no project was found, otherwise return
|
||||||
;; anzu--last-isearch-string anzu--overflow-p))
|
;; anzu--last-isearch-string anzu--overflow-p))
|
||||||
|
|
||||||
;; Ensure anzu state is cleared when searches & iedit are done
|
;; Ensure anzu state is cleared when searches & iedit are done
|
||||||
(add-hook 'isearch-mode-end-hook #'anzu--reset-status t)
|
;; (add-hook 'isearch-mode-end-hook #'anzu--reset-status t)
|
||||||
;; (add-hook '+evil-esc-hook #'anzu--reset-status t)
|
;; (add-hook '+evil-esc-hook #'anzu--reset-status t)
|
||||||
(add-hook 'iedit-mode-end-hook #'anzu--reset-status))
|
(add-hook 'iedit-mode-end-hook #'anzu--reset-status)
|
||||||
|
|
||||||
;; Keep `doom-modeline-current-window' up-to-date
|
;; Keep `doom-modeline-current-window' up-to-date
|
||||||
(defvar doom-modeline-current-window (frame-selected-window))
|
(defvar doom-modeline-current-window (frame-selected-window))
|
||||||
|
|
Loading…
Reference in a new issue