Merge pull request #124 from hlissner/patch-1

Hide checker segment when disabled/empty
This commit is contained in:
Vincent Zhang 2019-03-01 03:17:31 +07:00 committed by GitHub
commit cbc74f0e9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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))))
"")))
;; ;;