From 2beb80206a58ffbef69c183631a5697ca8e54fd0 Mon Sep 17 00:00:00 2001 From: Vincent Zhang Date: Thu, 21 Jun 2018 18:43:02 +0800 Subject: [PATCH] Fix: set current window after switching window via click. --- doom-modeline.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doom-modeline.el b/doom-modeline.el index 76e4297..e7fbac4 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -243,7 +243,8 @@ If STRICT-P, return nil if no project was found, otherwise return (force-mode-line-update)) (add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window) -(add-hook 'switch-window-finish-hook #'doom-modeline-set-selected-window) +(advice-add #'handle-switch-frame :after #'doom-modeline-set-selected-window) +(advice-add #'select-window :after #'doom-modeline-set-selected-window) (with-no-warnings (if (not (boundp 'after-focus-change-function)) (progn