Show modified status in scratch buffer modeline

This commit is contained in:
Henrik Lissner 2017-09-27 00:00:30 +02:00
parent 546ca0e313
commit fde07ba5df
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -344,8 +344,12 @@ directory, the file name, and its state (modified, read-only or non-existent)."
;; ;;
(def-modeline-segment! buffer-info-simple (def-modeline-segment! buffer-info-simple
"Return the current buffer name only, but with fontification." "Display only the current buffer's name, but with fontification."
(propertize "%b" 'face (if (active) 'doom-modeline-buffer-file))) (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 (def-modeline-segment! buffer-encoding