Remove extra space in the checker segment.

This commit is contained in:
Vincent Zhang 2020-02-16 23:31:23 +08:00
parent 68e17437cf
commit 87911f0144

View file

@ -986,27 +986,24 @@ mouse-1: List all problems%s"
`(,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 (when icon
(doom-modeline-spc) (concat
(when icon (doom-modeline-spc)
(if active (if active
icon icon
(propertize icon 'face (plist-put (propertize icon 'face (plist-put
(copy-list (get-text-property 0 'face icon)) (copy-list (get-text-property 0 'face icon))
:inherit nil)))) :inherit nil)))))
(when text (when text
(concat (concat
(doom-modeline-vspc) (if icon (doom-modeline-vspc) (doom-modeline-spc))
(if active (if active
text text
(propertize text 'face 'mode-line-inactive)))) (propertize text 'face 'mode-line-inactive))))))))
;; FIXME: Add one exra space to avoid the segment-cut issue
(doom-modeline-spc)))
"")))
;; ;;
;; Word Count ;; Word Count
@ -1023,6 +1020,7 @@ Respects `doom-modeline-enable-word-count'."
'mode-line 'mode-line
'mode-line-inactive)))) 'mode-line-inactive))))
;; ;;
;; Selection ;; Selection
;; ;;