diff options
Diffstat (limited to 'lib/eos')
| -rw-r--r-- | lib/eos/jao-minibuffer.el | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el index 5fdb18b..1777465 100644 --- a/lib/eos/jao-minibuffer.el +++ b/lib/eos/jao-minibuffer.el @@ -61,7 +61,7 @@           (msg (propertize msg :minibuffer-message t)))      (unless (string-empty-p msg)        (let* ((mw (jao-minibuffer--width)) -             (w (- mw (mod w mw) (length jao-minibuffer-right-margin) -1))) +             (w (- mw (mod w mw) (string-width jao-minibuffer-right-margin) -1)))          (if (> w 0) (jao-minibuffer--trim msg w) "")))))  (defun jao-minibuffer--insert (msg) @@ -82,10 +82,11 @@            (prefix (when-let (p (string-join (butlast msgs) "\n"))                      (unless (string-blank-p p) (concat p "\n"))))            (msg (car (last msgs))) -          (msg (if (string-blank-p msg) msg (concat msg "  ")))) +          (msg (if (string-blank-p msg) msg (concat msg "  "))) +          (w (string-width msg)))       (if jao-minibuffer-align-right-p -         (concat prefix msg (jao-minibuffer--aligned (length msg))) -       (concat prefix (jao-minibuffer--aligned (+ 3 (length msg))) "   " msg)))) +         (concat prefix msg (jao-minibuffer--aligned w)) +       (concat prefix (jao-minibuffer--aligned (+ 3 w)) "   " msg))))  (defun jao-minibuffer--set-message (msg)    (when jao-minibuffer-mode (jao-minibuffer--format-msg (or msg "")))) | 
