Use window-configuration-change-hook instead of the advice.

This commit is contained in:
Vincent Zhang 2019-05-22 23:42:59 +08:00
parent 376e6fb54a
commit 9c692eea2c

View file

@ -1247,8 +1247,7 @@ Returns \"\" to not break --no-window-system."
(doom-modeline-refresh-bars val doom-modeline-height))))) (doom-modeline-refresh-bars val doom-modeline-height)))))
(add-hook 'after-setting-font-hook #'doom-modeline-refresh-bars) (add-hook 'after-setting-font-hook #'doom-modeline-refresh-bars)
(advice-add #'set-face-attribute :after #'(lambda (&rest _) (add-hook 'window-configuration-change-hook #'doom-modeline-refresh-bars)
(doom-modeline-refresh-bars)))
;; ;;