Don't show state icon in inactive windows.

This commit is contained in:
Vincent Zhang 2018-11-27 18:13:13 +08:00
parent 6c941d824c
commit 58eb5c3b55

View file

@ -776,11 +776,15 @@ buffer where knowing the current project directory is important."
"Combined information about the current buffer, including the current working
directory, the file name, and its state (modified, read-only or non-existent)."
(concat
(when (and doom-modeline-icon doom-modeline-major-mode-icon)
;; major mode icon
(if (and doom-modeline-icon doom-modeline-major-mode-icon)
(or doom-modeline--buffer-file-icon (doom-modeline-update-buffer-file-icon)))
(or doom-modeline--buffer-file-state-icon (doom-modeline-update-buffer-file-state-icon))
;; state icon
(if (doom-modeline--active)
(or doom-modeline--buffer-file-state-icon (doom-modeline-update-buffer-file-state-icon)))
;; buffer file name
(if (doom-modeline--active)
(or doom-modeline--buffer-file-name (doom-modeline-update-buffer-file-name))
"%b")))