mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix #80: Errors without symbol-overlay.
This commit is contained in:
parent
202a90e660
commit
14d2e84b68
1 changed files with 15 additions and 14 deletions
|
@ -188,8 +188,7 @@ It returns a file name which can be used directly as argument of
|
||||||
(defvar mc/mode-line)
|
(defvar mc/mode-line)
|
||||||
(defvar minions-mode)
|
(defvar minions-mode)
|
||||||
(defvar minions-mode-line-lighter)
|
(defvar minions-mode-line-lighter)
|
||||||
(defvar symbol-overlay-keywords-alist)
|
(defvar symbol-overlay-mode)
|
||||||
(defvar symbol-overlay-temp-symbol)
|
|
||||||
(defvar text-scale-mode-amount)
|
(defvar text-scale-mode-amount)
|
||||||
(defvar winum-auto-setup-mode-line)
|
(defvar winum-auto-setup-mode-line)
|
||||||
(defvar xah-fly-insert-state-q)
|
(defvar xah-fly-insert-state-q)
|
||||||
|
@ -1206,18 +1205,20 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||||
|
|
||||||
(defsubst doom-modeline--symbol-overlay ()
|
(defsubst doom-modeline--symbol-overlay ()
|
||||||
"Show the number of matches for symbol overlay."
|
"Show the number of matches for symbol overlay."
|
||||||
(let* ((keyword (symbol-overlay-assoc
|
(when (and (bound-and-true-p symbol-overlay-mode)
|
||||||
(ignore-errors (symbol-overlay-get-symbol))))
|
(not (bound-and-true-p iedit-mode)))
|
||||||
(symbol (car keyword))
|
(let* ((keyword (symbol-overlay-assoc
|
||||||
(before (symbol-overlay-get-list symbol 'car))
|
(ignore-errors (symbol-overlay-get-symbol))))
|
||||||
(after (symbol-overlay-get-list symbol 'cdr))
|
(symbol (car keyword))
|
||||||
(count (length before)))
|
(before (symbol-overlay-get-list symbol 'car))
|
||||||
(if (symbol-overlay-assoc symbol)
|
(after (symbol-overlay-get-list symbol 'cdr))
|
||||||
(propertize
|
(count (length before)))
|
||||||
(format (concat " %d/%d " (and (cadr keyword) "in scope "))
|
(if (symbol-overlay-assoc symbol)
|
||||||
(+ count 1)
|
(propertize
|
||||||
(+ count (length after)))
|
(format (concat " %d/%d " (and (cadr keyword) "in scope "))
|
||||||
'face (if (doom-modeline--active) 'doom-modeline-panel)))))
|
(+ count 1)
|
||||||
|
(+ count (length after)))
|
||||||
|
'face (if (doom-modeline--active) 'doom-modeline-panel))))))
|
||||||
|
|
||||||
(defsubst doom-modeline--multiple-cursors ()
|
(defsubst doom-modeline--multiple-cursors ()
|
||||||
"Show the number of multiple cursors."
|
"Show the number of multiple cursors."
|
||||||
|
|
Loading…
Reference in a new issue