branch: master commit 569c11e9a4b1734594ac5c7a29fb607b259a4911 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
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 `ivy-completion-end'." (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)