Improve force redisplay advice.

The issue has been fixed in 29. The workaround should only work for old versions.
This commit is contained in:
Vincent Zhang 2021-11-24 20:07:42 +08:00
parent 36fed6d1a1
commit 05b213ff98

View file

@ -825,7 +825,8 @@ used as an advice to window creation functions."
mode-line-format
(/= (frame-char-height) (window-mode-line-height)))
(redisplay t)))
(advice-add 'split-window :after #'doom-modeline-redisplay)
(unless (>= emacs-major-version 29)
(advice-add 'split-window :after #'doom-modeline-redisplay))
;; Keep `doom-modeline-current-window' up-to-date
(defun doom-modeline--get-current-window (&optional frame)