summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-01-26 14:05:19 +0000
committerjao <jao@gnu.org>2021-01-26 14:05:19 +0000
commitf5434a47854a2a6aff9ab590d22bea1a8e00a1cb (patch)
tree54a7417da520e2df0664ffedc23f15fcbd7bd73a
parente2335f110d65a60fdb499285ac34821aca01a70b (diff)
downloadelibs-f5434a47854a2a6aff9ab590d22bea1a8e00a1cb.tar.gz
elibs-f5434a47854a2a6aff9ab590d22bea1a8e00a1cb.tar.bz2
minibuffer: detect command prompts
-rw-r--r--eos/jao-minibuffer.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/eos/jao-minibuffer.el b/eos/jao-minibuffer.el
index 452f67a..3294d4b 100644
--- a/eos/jao-minibuffer.el
+++ b/eos/jao-minibuffer.el
@@ -74,11 +74,13 @@
(if (> w 0) (jao-minibuffer--trim msg w) "")))))
(defun jao-minibuffer--set-message (msg)
- (let* ((msg (string-trim (replace-regexp-in-string "\n" " " msg)))
- (msg (if (string-blank-p msg) msg (concat msg " "))))
- (if jao-minibuffer-align-right-p
- (concat msg (jao-minibuffer--aligned (length msg) t))
- (concat (jao-minibuffer--aligned (+ 3 (length msg)) t) " " msg))))
+ (if current-minibuffer-command
+ msg
+ (let* ((msg (string-trim (replace-regexp-in-string "\n" " " msg)))
+ (msg (if (string-blank-p msg) msg (concat msg " "))))
+ (if jao-minibuffer-align-right-p
+ (concat msg (jao-minibuffer--aligned (length msg) t))
+ (concat (jao-minibuffer--aligned (+ 3 (length msg)) t) " " msg)))))
(defun jao-minibuffer--insert (msg)
(with-current-buffer jao-minibuffer--name