Revert: Refresh the mode-line forcedly after switching frames.

Revert 62f48c062e.
Close #186.
This commit is contained in:
Vincent Zhang 2019-06-10 15:41:13 +08:00
parent 28ca62c735
commit 118f7084ff

View file

@ -441,9 +441,6 @@ If the actual char height is larger, it respects the actual char height.")
(add-hook 'after-make-frame-functions #'doom-modeline-set-selected-window) (add-hook 'after-make-frame-functions #'doom-modeline-set-selected-window)
(add-hook 'delete-frame-functions #'doom-modeline-set-selected-window) (add-hook 'delete-frame-functions #'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 #'handle-switch-frame :after #'(lambda (&rest _)
"Rever the current buffer."
(ignore-errors (revert-buffer t t))))
(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)