Merge pull request #135 from Alexander-Miller/select-window

Use buffer-list-update-hook instead of advising select-window.
This commit is contained in:
Vincent Zhang 2019-03-07 04:10:00 +07:00 committed by GitHub
commit 77cf8a45c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -383,8 +383,8 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
(force-mode-line-update)) (force-mode-line-update))
(add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window) (add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window)
(add-hook 'buffer-list-update-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 #'make-frame :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) (advice-add #'delete-frame :after #'doom-modeline-set-selected-window)
(with-no-warnings (with-no-warnings