summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/eos/jao-minibuffer.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el
index e48e6ea..09497e8 100644
--- a/lib/eos/jao-minibuffer.el
+++ b/lib/eos/jao-minibuffer.el
@@ -60,6 +60,11 @@
(dolist (o jao-minibuffer--overlays)
(when (overlay-buffer o) (overlay-put o 'after-string txt)))))
+(defun jao-minibuffer--minibuffer-setup ()
+ (push (make-overlay (point-max) (point-max) nil t t) jao-minibuffer--overlays)
+ (overlay-put (car jao-minibuffer--overlays) 'priority 1)
+ (jao-minibuffer-refresh))
+
(defun jao-minibuffer--trim (s w)
(if (<= (string-width (or s "")) w)
(format (format "%%%ds" (if jao-minibuffer-align-right-p w (- w))) s)
@@ -178,9 +183,11 @@
(progn (advice-add 'select-window :after #'jao-minibuffer-refresh)
(advice-add 'force-mode-line-update :after #'jao-minibuffer-refresh)
(jao-minibuffer--create-overlays)
+ (add-hook 'minibuffer-setup-hook #'jao-minibuffer--minibuffer-setup)
(jao-minibuffer-refresh))
(advice-remove 'select-window #'jao-minibuffer-refresh)
(advice-remove 'force-mode-line-update #'jao-minibuffer-refresh)
+ (remove-hook 'minibuffer-setup-hook #'jao-minibuffer--minibuffer-setup)
(jao-minibuffer--remove-overlays)
(jao-minibuffer--insert "")))