mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Hide checker segment when disabled/empty
For buffers that don't have either mode enabled or a valid checker present.
This commit is contained in:
parent
5f9d9a2e48
commit
386000d47f
1 changed files with 25 additions and 23 deletions
|
@ -831,6 +831,7 @@ icons."
|
||||||
`(,doom-modeline--flymake-icon . ,doom-modeline--flymake-text))
|
`(,doom-modeline--flymake-icon . ,doom-modeline--flymake-text))
|
||||||
((bound-and-true-p flycheck-mode)
|
((bound-and-true-p flycheck-mode)
|
||||||
`(,doom-modeline--flycheck-icon . ,doom-modeline--flycheck-text)))))
|
`(,doom-modeline--flycheck-icon . ,doom-modeline--flycheck-text)))))
|
||||||
|
(if seg
|
||||||
(let ((icon (car seg))
|
(let ((icon (car seg))
|
||||||
(text (cdr seg)))
|
(text (cdr seg)))
|
||||||
(concat
|
(concat
|
||||||
|
@ -853,7 +854,8 @@ icons."
|
||||||
'mode-line-inactive)))
|
'mode-line-inactive)))
|
||||||
(when (and icon text) doom-modeline-inactive-vspc)
|
(when (and icon text) doom-modeline-inactive-vspc)
|
||||||
(when text (propertize text 'face 'mode-line-inactive))))
|
(when text (propertize text 'face 'mode-line-inactive))))
|
||||||
(propertize " " 'face (if active 'mode-line 'mode-line-inactive))))))
|
(propertize " " 'face (if active 'mode-line 'mode-line-inactive))))
|
||||||
|
"")))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue