Fix incorrect faces of buffer file name.

See https://github.com/seagle0128/doom-modeline/issues/114#issuecomment-469060334.
This commit is contained in:
Vincent Zhang 2019-03-04 23:38:33 +07:00
parent de4c631252
commit c69ec1e5c5

View file

@ -289,6 +289,14 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
(advice-add #'undo-tree-redo-1 :after #'doom-modeline-update-buffer-file-name) (advice-add #'undo-tree-redo-1 :after #'doom-modeline-update-buffer-file-name)
(advice-add #'symbol-overlay-rename :after #'doom-modeline-update-buffer-file-name) (advice-add #'symbol-overlay-rename :after #'doom-modeline-update-buffer-file-name)
(with-no-warnings
(if (boundp 'after-focus-change-function)
(add-function :after after-focus-change-function
(lambda ()
(if (frame-focus-state)
(doom-modeline-update-buffer-file-name))))
(add-hook 'focus-in-hook #'doom-modeline-update-buffer-file-name)))
(when (>= emacs-major-version 26) (when (>= emacs-major-version 26)
(add-variable-watcher (add-variable-watcher
'doom-modeline-buffer-file-name-style 'doom-modeline-buffer-file-name-style