Fix incorrect file icon.

See https://github.com/seagle0128/doom-modeline/issues/114#issuecomment-462471548.
This commit is contained in:
Vincent Zhang 2019-02-12 17:41:26 +08:00
parent 5632bb02b5
commit eab39937cd

View file

@ -298,7 +298,8 @@ directory, the file name, and its state (modified, read-only or non-existent)."
;; major mode icon
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
(when-let ((icon (or doom-modeline--buffer-file-icon
(doom-modeline-update-buffer-file-icon))))
(doom-modeline-update-buffer-file-icon)))
(face (if active 'mode-line 'mode-line-inactive)))
(concat
(if (and active doom-modeline-major-mode-color-icon)
icon
@ -307,7 +308,7 @@ directory, the file name, and its state (modified, read-only or non-existent)."
,(doom-modeline-icon-height 1.1)
:family
,(all-the-icons-icon-family icon)
:inherit mode-line-inactive)))
:inherit ,face)))
(if active doom-modeline-vspc doom-modeline-inactive-vspc))))
;; state icon