mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Watch doom-modeline-buffer-file-name-style.
This commit is contained in:
parent
82e7020eec
commit
3d3b210325
1 changed files with 11 additions and 0 deletions
|
@ -269,6 +269,17 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
|
||||||
(advice-add #'undo-tree-redo :after #'doom-modeline-update-buffer-file-name)
|
(advice-add #'undo-tree-redo :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)
|
||||||
|
|
||||||
|
(when (>= emacs-major-version 26)
|
||||||
|
(add-variable-watcher
|
||||||
|
'doom-modeline-buffer-file-name-style
|
||||||
|
(lambda (_sym val op _where)
|
||||||
|
(when (eq op 'set)
|
||||||
|
(setq doom-modeline-buffer-file-name-style val)
|
||||||
|
(dolist (buf (buffer-list))
|
||||||
|
(with-current-buffer buf
|
||||||
|
(if buffer-file-name
|
||||||
|
(doom-modeline-update-buffer-file-name))))))))
|
||||||
|
|
||||||
(doom-modeline-def-segment buffer-info
|
(doom-modeline-def-segment buffer-info
|
||||||
"Combined information about the current buffer, including the current working
|
"Combined information about the current buffer, including the current working
|
||||||
directory, the file name, and its state (modified, read-only or non-existent)."
|
directory, the file name, and its state (modified, read-only or non-existent)."
|
||||||
|
|
Loading…
Reference in a new issue