From fde07ba5dfb4824dd514dedb7c2659bcf1d3a563 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 27 Sep 2017 00:00:30 +0200 Subject: [PATCH] Show modified status in scratch buffer modeline --- modules/ui/doom-modeline/config.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/ui/doom-modeline/config.el b/modules/ui/doom-modeline/config.el index 73c9006a4..07c36e9ec 100644 --- a/modules/ui/doom-modeline/config.el +++ b/modules/ui/doom-modeline/config.el @@ -344,8 +344,12 @@ directory, the file name, and its state (modified, read-only or non-existent)." ;; (def-modeline-segment! buffer-info-simple - "Return the current buffer name only, but with fontification." - (propertize "%b" 'face (if (active) 'doom-modeline-buffer-file))) + "Display only the current buffer's name, but with fontification." + (propertize + "%b" + 'face (cond ((and buffer-file-name (buffer-modified-p)) + 'doom-modeline-buffer-modified) + ((active) 'doom-modeline-buffer-file)))) ;; (def-modeline-segment! buffer-encoding