Skip to content

Commit

Permalink
bug: completely take control of resize-mini-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kiennq committed Mar 7, 2020
1 parent 2348b9f commit 6b6efe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mini-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ BODY will be supplied with orig-func and args."
(declare-function anzu--cons-mode-line "ext:anzu")
(declare-function anzu--reset-mode-line "ext:anzu")

(defvar mini-modeline--orig-resize-mini-windows resize-mini-windows)
(defvar mini-modeline--timer nil)

(defun mini-modeline--enable ()
Expand All @@ -315,8 +316,8 @@ BODY will be supplied with orig-func and args."
'mini-modeline-mode-line)
(setf (alist-get 'mode-line-inactive face-remapping-alist)
'mini-modeline-mode-line-inactive))
(setq resize-mini-windows nil)
(redisplay)
(setq resize-mini-windows t)
;; (add-hook 'pre-redisplay-functions #'mini-modeline-display)
(setq mini-modeline--timer (run-with-timer 0 0.1 #'mini-modeline-display))
(when mini-modeline-enhance-visual
Expand Down Expand Up @@ -365,6 +366,7 @@ BODY will be supplied with orig-func and args."
(with-current-buffer buf
(setq mode-line-format mini-modeline--orig-mode-line))))
(buffer-list))
(setq resize-mini-windows mini-modeline--orig-resize-mini-windows)
(redisplay)
;; (remove-hook 'post-command-hook #'mini-modeline-display)
;; (remove-hook 'pre-redisplay-functions #'mini-modeline-display)
Expand Down

0 comments on commit 6b6efe6

Please sign in to comment.