diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/eos/jao-minibuffer.el | 3 | ||||
-rw-r--r-- | lib/eos/jao-mode-line.el | 11 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 529ed5f..9bf6f92 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -148,8 +148,7 @@ (let ((jao-minibuffer-mode nil) (msg (when jao-minibuffer-msg-info (jao-minibuffer--format-info jao-minibuffer-msg-info)))) - (jao-minibuffer--insert (jao-minibuffer--format-msg (or msg ""))) - (force-window-update (minibuffer-window))))) + (jao-minibuffer--insert (jao-minibuffer--format-msg (or msg "")))))) (provide 'jao-minibuffer) ;;; jao-minibuffer.el ends here diff --git a/lib/eos/jao-mode-line.el b/lib/eos/jao-mode-line.el index 5d2bcd9..e4f64c0 100644 --- a/lib/eos/jao-mode-line.el +++ b/lib/eos/jao-mode-line.el @@ -140,13 +140,20 @@ ;; :overline bg :underline ul :extend t))) +(defun jao-mode-line--maybe-refresh () + (when (mode-line-window-selected-p) (jao-minibuffer-refresh))) + +(defconst jao-mode-line--hidden-format + '("" (:eval (jao-mode-line--maybe-refresh)))) + (defun jao-mode-line--add-to-minibuffer (order msg-p) (interactive) (setq jao-mode-line--old-format mode-line-format) - (setq-default mode-line-format '(" ")) + (setq-default mode-line-format jao-mode-line--hidden-format) (setq-default mode-line-position jao-mode-line--position) (dolist (b (buffer-list)) - (with-current-buffer b (setq-local mode-line-format '(" ")))) + (with-current-buffer b + (setq-local mode-line-format jao-mode-line--hidden-format))) (if msg-p (jao-minibuffer-add-msg-variable '(jao-mode-line--old-str) (or order 90)) (jao-minibuffer-add-variable 'jao-mode-line--format (or order 90))) |