Revert "Improve the workaround: avoid window flicker."

This reverts commit aed094c437.
Close #485.
This commit is contained in:
Vincent Zhang 2021-10-25 01:20:23 +08:00
parent 5d55484576
commit 25e81e77cd

View file

@ -803,7 +803,6 @@ etc. (also see the face `doom-modeline-unread-number')."
;; FIXME #183: Force to calculate mode-line height
;; @see https://github.com/seagle0128/doom-modeline/issues/183
;; @see https://github.com/seagle0128/doom-modeline/issues/483
(defvar-local doom-modeline--size-hacked-p nil)
(defun doom-modeline-redisplay (&rest _)
"Call `redisplay' to trigger mode-line height calculations.
@ -824,9 +823,8 @@ from that of the `default' face. This function is intended to be
used as an advice to window creation functions."
(when (and (bound-and-true-p doom-modeline-mode)
mode-line-format
(not doom-modeline--size-hacked-p))
(redisplay t)
(setq doom-modeline--size-hacked-p t)))
(/= (frame-char-height) (window-mode-line-height)))
(redisplay t)))
(advice-add 'split-window :after #'doom-modeline-redisplay)
;; Keep `doom-modeline-current-window' up-to-date