branch: master
commit a71d5c8a1f699bc7212b06623a3b030ebe722cde
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy--insert-prompt): Improve truncation
Re #240
---
ivy.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index 04c254e..1bb3326 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1294,9 +1294,9 @@ Insert .* between each char."
(save-excursion
(goto-char (point-min))
(delete-region (point-min) (minibuffer-prompt-end))
- (when (> (length n-str) (window-width))
+ (when (> (length n-str) (- (window-width) 35))
(setq n-str (concat (substring n-str 0
- (max (- (window-width) 30)
+ (max (- (window-width) 35)
10)) "... ")))
(set-text-properties 0 (length n-str)
`(face minibuffer-prompt ,@std-props)