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

This commit is contained in:
Alexander Miller 2019-03-06 12:48:33 +01:00
parent 5c926b81de
commit eabfed0068

View file

@ -386,8 +386,8 @@ If DEFAULT is non-nil, set the default mode-line for all buffers."
(force-mode-line-update))
(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 #'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