From c97e06454bcb43525c3550cdfeefb82edf8d17dd Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 5 Sep 2019 03:30:43 +0800 Subject: [PATCH] Only change the face of buffer files. --- doom-modeline-segments.el | 4 +++- doom-modeline.el | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 427569e..42c3fc2 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -379,7 +379,9 @@ mouse-1: Previous buffer\nmouse-3: Next buffer" ;; `doom-modeline--buffer-file-name' may consume lots of CPU if it's called too frequently. (defun doom-modeline-update-buffer-file-name-face (&rest _) "Update the face of buffer file name in mode-line." - (when (and doom-modeline--buffer-file-name (buffer-modified-p)) + (when (and buffer-file-name + doom-modeline--buffer-file-name + (buffer-modified-p)) (setq doom-modeline--buffer-file-name (propertize doom-modeline--buffer-file-name 'face 'doom-modeline-buffer-modified)))) (add-hook 'after-change-functions #'doom-modeline-update-buffer-file-name-face) diff --git a/doom-modeline.el b/doom-modeline.el index 63609f8..9a14c21 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -4,7 +4,7 @@ ;; Author: Vincent Zhang ;; Homepage: https://github.com/seagle0128/doom-modeline -;; Version: 2.6.0 +;; Version: 2.6.1 ;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (dash "2.11.0")) ;; Keywords: faces mode-line