mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Add evil-mc support to multiple-cursors segment
This commit is contained in:
parent
80bc70fa82
commit
ac8bcc2551
1 changed files with 18 additions and 6 deletions
|
@ -1036,12 +1036,24 @@ Requires `anzu', also `evil-anzu' if using `evil-mode' for compatibility with
|
||||||
|
|
||||||
(defsubst doom-modeline--multiple-cursors ()
|
(defsubst doom-modeline--multiple-cursors ()
|
||||||
"Show the number of multiple cursors."
|
"Show the number of multiple cursors."
|
||||||
(when (bound-and-true-p multiple-cursors-mode)
|
(cl-destructuring-bind (count . face)
|
||||||
(propertize
|
(cond ((bound-and-true-p multiple-cursors-mode)
|
||||||
(concat (car mc/mode-line)
|
(cons (eval (cadadr mc/mode-line))
|
||||||
(eval (cadadr mc/mode-line))
|
(if (doom-modeline--active)
|
||||||
" ")
|
'mode-line-inactive
|
||||||
'face (if (doom-modeline--active) 'doom-modeline-panel 'mode-line-inactive))))
|
'doom-modeline-eldoc-bar)))
|
||||||
|
((bound-and-true-p evil-mc-cursor-list)
|
||||||
|
(cons (length evil-mc-cursor-list)
|
||||||
|
(cond ((not (doom-modeline--active)) 'mode-line-inactive)
|
||||||
|
(evil-mc-frozen 'doom-modeline-panel)
|
||||||
|
('doom-modeline-eldoc-bar))))
|
||||||
|
((cons nil nil)))
|
||||||
|
(when count
|
||||||
|
(concat (propertize " " 'face face)
|
||||||
|
(doom-modeline-icon-faicon "i-cursor" :face face :v-adjust -0.1)
|
||||||
|
(propertize doom-modeline-vspc 'face `(:inherit (variable-pitch ,face)))
|
||||||
|
(propertize (format "%d " count)
|
||||||
|
'face face)))))
|
||||||
|
|
||||||
(defsubst doom-modeline--buffer-size ()
|
(defsubst doom-modeline--buffer-size ()
|
||||||
"Show buffer size."
|
"Show buffer size."
|
||||||
|
|
Loading…
Reference in a new issue