Use buffer-list-update-hook instead of advising select-window.

Follow #135.
This commit is contained in:
Vincent Zhang 2019-03-07 04:11:05 +07:00
parent 77cf8a45c4
commit 52f46c1baf

View file

@ -1240,7 +1240,7 @@ mouse-2: Show help for minor mode"
(add-hook 'find-file-hook #'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)
(advice-add #'select-window :after #'doom-modeline-update-persp-name)
(add-hook 'buffer-list-update-hook #'doom-modeline-update-persp-name)
(doom-modeline-def-segment persp-name
"The current perspective name."