Fix #7: text scale is only shown for positive values.

This commit is contained in:
Vincent Zhang 2018-07-07 12:40:03 +08:00
parent 320fe0ea34
commit 845e0319d3

View file

@ -682,9 +682,12 @@ directory, the file name, and its state (modified, read-only or non-existent)."
(when doom-modeline-env-version
(concat " " doom-modeline-env-version))
(and (featurep 'face-remap)
(> text-scale-mode-amount 0)
(/= text-scale-mode-amount 0)
(format " (%+d)" text-scale-mode-amount)))
(format
(if (> text-scale-mode-amount 0)
" (%+d)"
" (%-d)")
text-scale-mode-amount)))
'face (if (doom-modeline--active) 'doom-modeline-buffer-major-mode)))