mirror of
https://github.com/correl/doom-modeline.git
synced 2024-12-28 19:19:21 +00:00
Watch doom-modeline-buffer-file-name-style
to update buffer info.
This commit is contained in:
parent
781ce1b3c2
commit
561560dfe5
1 changed files with 7 additions and 0 deletions
|
@ -629,6 +629,13 @@ buffer where knowing the current project directory is important."
|
|||
(add-hook 'after-save-hook #'doom-modeline-update-buffer-file-name)
|
||||
(advice-add #'rename-buffer :after #'doom-modeline-update-buffer-file-name)
|
||||
|
||||
(when (>= emacs-major-version 26)
|
||||
(add-variable-watcher
|
||||
'doom-modeline-buffer-file-name-style
|
||||
(lambda (_sym _val op _where)
|
||||
(when (eq op 'set)
|
||||
(doom-modeline-update-buffer-file-name)))))
|
||||
|
||||
(doom-modeline-def-segment buffer-info
|
||||
"Combined information about the current buffer, including the current working
|
||||
directory, the file name, and its state (modified, read-only or non-existent)."
|
||||
|
|
Loading…
Reference in a new issue