Fix: sometimes the persp name is not updated. e.g. other-window.

This commit is contained in:
Vincent Zhang 2019-06-06 17:11:26 +08:00
parent 5e8b134b5b
commit ae0ecddd31

View file

@ -1362,9 +1362,9 @@ mouse-2: Show help for minor mode"
(doom-modeline-spc))))))) (doom-modeline-spc)))))))
(add-hook 'find-file-hook #'doom-modeline-update-persp-name) (add-hook 'find-file-hook #'doom-modeline-update-persp-name)
(add-hook 'buffer-list-update-hook #'doom-modeline-update-persp-name)
(add-hook 'persp-activated-functions #'doom-modeline-update-persp-name) (add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
(add-hook 'persp-renamed-functions #'doom-modeline-update-persp-name) (add-hook 'persp-renamed-functions #'doom-modeline-update-persp-name)
(advice-add #'select-window :after #'doom-modeline-update-persp-name)
(doom-modeline-def-segment persp-name (doom-modeline-def-segment persp-name
"The current perspective name." "The current perspective name."