mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix #17: Undefined variable evil-ex-start-word-search.
This commit is contained in:
parent
aa25e7b143
commit
ec11fef2a5
1 changed files with 23 additions and 21 deletions
|
@ -325,30 +325,31 @@ 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)
|
(when (featurep 'anzu)
|
||||||
(eval-and-compile
|
(add-hook 'anzu-mode-hook
|
||||||
(setq anzu-cons-mode-line-p nil
|
(lambda ()
|
||||||
anzu-minimum-input-length 1
|
(setq anzu-cons-mode-line-p nil
|
||||||
anzu-search-threshold 250)
|
anzu-minimum-input-length 1
|
||||||
|
anzu-search-threshold 250)))
|
||||||
|
|
||||||
(defun doom-modeline-fix-anzu-count (positions here)
|
(defun doom-modeline-fix-anzu-count (positions 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))
|
||||||
return (length before)
|
return (length before)
|
||||||
finally return 0))
|
finally return 0))
|
||||||
|
|
||||||
(advice-add #'anzu--where-is-here :override #'doom-modeline-fix-anzu-count)
|
(advice-add #'anzu--where-is-here :override #'doom-modeline-fix-anzu-count)
|
||||||
|
|
||||||
;; Avoid anzu conflicts across buffers
|
;; Avoid anzu conflicts across buffers
|
||||||
;; (mapc #'make-variable-buffer-local
|
;; (mapc #'make-variable-buffer-local
|
||||||
;; '(anzu--total-matched anzu--current-position anzu--state
|
;; '(anzu--total-matched anzu--current-position anzu--state
|
||||||
;; 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))
|
||||||
|
|
||||||
;; 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))
|
||||||
|
@ -845,7 +846,8 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||||
|
|
||||||
(defsubst doom-modeline--iedit ()
|
(defsubst doom-modeline--iedit ()
|
||||||
"Show the number of iedit regions matches + what match you're on."
|
"Show the number of iedit regions matches + what match you're on."
|
||||||
(when (and (bound-and-true-p iedit-mode) (bound-and-true-p iedit-occurrences-overlays))
|
(when (and (bound-and-true-p iedit-mode)
|
||||||
|
(bound-and-true-p iedit-occurrences-overlays))
|
||||||
(propertize
|
(propertize
|
||||||
(let ((this-oc (or (let ((inhibit-message t))
|
(let ((this-oc (or (let ((inhibit-message t))
|
||||||
(iedit-find-current-occurrence-overlay))
|
(iedit-find-current-occurrence-overlay))
|
||||||
|
|
Loading…
Reference in a new issue