ui/modeline: prevent cut-off popups #2219
By forcing resized windows to take non-standard modeline height into account.
This commit is contained in:
parent
6c0d71eb65
commit
0e4d25d533
2 changed files with 9 additions and 8 deletions
|
@ -68,14 +68,6 @@ side of the modeline, and whose CDR is the right-hand side.")
|
||||||
;;
|
;;
|
||||||
;;; Helpers
|
;;; Helpers
|
||||||
|
|
||||||
(defvar +modeline--redisplayed-p nil)
|
|
||||||
(defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored)
|
|
||||||
"Ensure that window resizing functions take modeline height into account."
|
|
||||||
:before '(fit-window-to-buffer resize-temp-buffer-window)
|
|
||||||
(unless +modeline--redisplayed-p
|
|
||||||
(setq-local +modeline--redisplayed-p t)
|
|
||||||
(redisplay t)))
|
|
||||||
|
|
||||||
;;; `active'
|
;;; `active'
|
||||||
(defvar +modeline--active-window (selected-window))
|
(defvar +modeline--active-window (selected-window))
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,15 @@
|
||||||
(load! "+light"))
|
(load! "+light"))
|
||||||
|
|
||||||
|
|
||||||
|
(defvar +modeline--redisplayed-p nil)
|
||||||
|
(defadvice! modeline-recalculate-height-a (&optional _force &rest _ignored)
|
||||||
|
"Ensure that window resizing functions take modeline height into account."
|
||||||
|
:before '(fit-window-to-buffer resize-temp-buffer-window)
|
||||||
|
(unless +modeline--redisplayed-p
|
||||||
|
(setq-local +modeline--redisplayed-p t)
|
||||||
|
(redisplay t)))
|
||||||
|
|
||||||
|
|
||||||
(use-package! doom-modeline
|
(use-package! doom-modeline
|
||||||
:unless (featurep! +light)
|
:unless (featurep! +light)
|
||||||
:hook (after-init . doom-modeline-mode)
|
:hook (after-init . doom-modeline-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue