summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-minibuffer.el
diff options
context:
space:
mode:
Diffstat (limited to 'lib/eos/jao-minibuffer.el')
-rw-r--r--lib/eos/jao-minibuffer.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el
index 9bf6f92..44af185 100644
--- a/lib/eos/jao-minibuffer.el
+++ b/lib/eos/jao-minibuffer.el
@@ -88,7 +88,7 @@
(defun jao-minibuffer--set-message (msg)
(when jao-minibuffer-mode
- (or (and (string= jao-minibuffer--name (buffer-name)) msg)
+ (or (and (string= jao-minibuffer--name (or (buffer-name) "")) msg)
jao-minibuffer-inhibit
(let* ((info (and jao-minibuffer-msg-info
(jao-minibuffer--format-info jao-minibuffer-msg-info)))
@@ -98,7 +98,9 @@
(pref (when info
(let ((len (+ (length info) (length sep))))
(format (format "\n%%%ds" len) ""))))
- (msg (if pref (replace-regexp-in-string "\n" pref msg) msg))
+ (msg (if (and msg pref)
+ (replace-regexp-in-string "\n" pref msg)
+ msg))
(msg (if info (format "%s%s%s " info sep (or msg "")) msg)))
(jao-minibuffer--format-msg (or msg ""))))))