[Top][All Lists]

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

[elpa] master 569c11e 017/272: ivy.el (ivy-completion-in-region): Use co

From: Oleh Krehel
Subject: [elpa] master 569c11e 017/272: ivy.el (ivy-completion-in-region): Use compact ivy-count-format
Date: Mon, 25 Apr 2016 10:13:14 +0000

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

    ivy.el (ivy-completion-in-region): Use compact ivy-count-format
 ivy.el |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivy.el b/ivy.el
index feff8d9..8ab8139 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1380,7 +1380,9 @@ The previous string is between `ivy-completion-beg' and 
 (defun ivy-completion-in-region (start end collection &optional predicate)
   "An Ivy function suitable for `completion-in-region-function'."
   (let* ((str (buffer-substring-no-properties start end))
-         (comps (all-completions str collection predicate)))
+         (comps (all-completions str collection predicate))
+         (w (1+ (floor (log (length comps) 10))))
+         (ivy-count-format (format "%%-%dd " w)))
     (if (null comps)
         (message "No matches")
       (setq ivy-completion-beg start)

reply via email to

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