Update mode-line after new or delete a frame.

This commit is contained in:
Vincent Zhang 2018-10-28 03:16:31 +08:00
parent d97080620e
commit 11327006cf

View file

@ -393,6 +393,8 @@ active.")
(add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window) (add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window)
(advice-add #'handle-switch-frame :after #'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) (advice-add #'select-window :after #'doom-modeline-set-selected-window)
(advice-add #'make-frame :after #'doom-modeline-set-selected-window)
(advice-add #'delete-frame :after #'doom-modeline-set-selected-window)
(with-no-warnings (with-no-warnings
(cond ((not (boundp 'after-focus-change-function)) (cond ((not (boundp 'after-focus-change-function))
(add-hook 'focus-in-hook #'doom-modeline-set-selected-window) (add-hook 'focus-in-hook #'doom-modeline-set-selected-window)