emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master e03d968 50/54: ivy.el (ivy--insert-prompt): Avoid negative


From: Oleh Krehel
Subject: [elpa] master e03d968 50/54: ivy.el (ivy--insert-prompt): Avoid negative length error
Date: Tue, 29 Sep 2015 14:10:10 +0000

branch: master
commit e03d96871e4d66a853343eec3856bed7fc3e58b7
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy--insert-prompt): Avoid negative length error
---
 ivy.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index dc17faa..04c254e 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1295,7 +1295,9 @@ Insert .* between each char."
           (goto-char (point-min))
           (delete-region (point-min) (minibuffer-prompt-end))
           (when (> (length n-str) (window-width))
-            (setq n-str (concat (substring n-str 0 (- (window-width) 30)) "... 
")))
+            (setq n-str (concat (substring n-str 0
+                                           (max (- (window-width) 30)
+                                                10)) "... ")))
           (set-text-properties 0 (length n-str)
                                `(face minibuffer-prompt ,@std-props)
                                n-str)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]