modeline: fix inconsistent spacing on right of modeline

This commit is contained in:
Henrik Lissner 2017-01-03 22:51:10 -05:00
parent dbacc26e11
commit a2fa66ea37

View file

@ -297,7 +297,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(setq doom--flycheck-cache (setq doom--flycheck-cache
(let ((fw (doom-ml-flycheck-count 'warning)) (let ((fw (doom-ml-flycheck-count 'warning))
(fe (doom-ml-flycheck-count 'error))) (fe (doom-ml-flycheck-count 'error)))
(concat (if (or fe fw) " ") (concat (if (or fe fw) " ")
(if fe (concat (if fe (concat
(all-the-icons-octicon "circle-slash" :face 'doom-modeline-urgent :height 1.0 :v-adjust 0) (all-the-icons-octicon "circle-slash" :face 'doom-modeline-urgent :height 1.0 :v-adjust 0)
(propertize " " 'face 'variable-pitch) (propertize " " 'face 'variable-pitch)
@ -311,11 +311,11 @@ directory, the file name, and its state (modified, read-only or non-existent)."
" " " "
)) ))
(if (or fe fw) (if (or fe fw)
" " " "
(when (active) (when (active)
(all-the-icons-octicon "check" :height 1.2 :v-adjust -0.06)))))))) (all-the-icons-octicon "check" :height 1.2 :v-adjust -0.06))))))))
(concat (concat
" " " "
(all-the-icons-octicon "check" (all-the-icons-octicon "check"
:face (if (active) 'doom-modeline-info) :face (if (active) 'doom-modeline-info)
:height 1.2 :height 1.2
@ -444,8 +444,8 @@ lines are selected, or the NxM dimensions of a block selection."
'(list (*buffer-encoding) '(list (*buffer-encoding)
(*vc) (*vc)
(*major-mode) (*major-mode)
" " (*flycheck)
(*flycheck)))) )))
(mid (propertize (mid (propertize
" " 'display `((space :align-to (- (+ right right-fringe right-margin) " " 'display `((space :align-to (- (+ right right-fringe right-margin)
,(+ 1 (string-width (format-mode-line rhs))))))))) ,(+ 1 (string-width (format-mode-line rhs)))))))))