From 3e7df26a308f438d54b9c23543bd1434b89b080a Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Tue, 19 Feb 2019 02:20:55 +0800 Subject: [PATCH] Display icons for temp buffers. --- doom-modeline-segments.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 76dc1fc..788edee 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -160,7 +160,9 @@ buffer where knowing the current project directory is important." (setq doom-modeline--buffer-file-icon (when (and doom-modeline-icon doom-modeline-major-mode-icon) (let* ((height (/ all-the-icons-scale-factor 1.3)) - (icon (doom-modeline-icon-for-file (buffer-name) :height height))) + (icon (if buffer-file-name + (doom-modeline-icon-for-file buffer-file-name :height height) + (doom-modeline-icon-for-mode major-mode :height height)))) (unless (symbolp icon) (propertize icon 'help-echo (format "Major-mode: %s" mode-name)