summaryrefslogtreecommitdiffhomepage
path: root/lib/eos/jao-minibuffer.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-12-01 05:18:57 +0000
committerjao <jao@gnu.org>2024-12-01 05:19:14 +0000
commited457a9d22991727eae7e488a016c315131d115f (patch)
treec206bafe9f39a98cfd43f505699960d4ddc8dbe8 /lib/eos/jao-minibuffer.el
parent418212e4eb963813c078cf290cddfe7e3defd7ed (diff)
downloadelibs-ed457a9d22991727eae7e488a016c315131d115f.tar.gz
elibs-ed457a9d22991727eae7e488a016c315131d115f.tar.bz2
nits
Diffstat (limited to 'lib/eos/jao-minibuffer.el')
-rw-r--r--lib/eos/jao-minibuffer.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/eos/jao-minibuffer.el b/lib/eos/jao-minibuffer.el
index 77bd49a..42cef74 100644
--- a/lib/eos/jao-minibuffer.el
+++ b/lib/eos/jao-minibuffer.el
@@ -40,7 +40,7 @@
(defun jao-minibuffer--trim (s w)
(if (< (string-width (or s "")) w)
(format (format "%%%ds" (if jao-minibuffer-align-right w (- w))) s)
- (substring s 0 w)))
+ (substring s 0 (min w (length s)))))
(defun jao-minibuffer--width ()
(cond ((numberp jao-minibuffer-frame-width) jao-minibuffer-frame-width)