From 52f46c1baf5713ad1d3f6724f9f7e02dd32155ba Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 7 Mar 2019 04:11:05 +0700 Subject: [PATCH] Use buffer-list-update-hook instead of advising select-window. Follow #135. --- doom-modeline-segments.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 4d736aa..050cd44 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -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."