[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a0f1e25 021/272: ivy.el (ivy-completion-in-region): Fix lo
From: |
Oleh Krehel |
Subject: |
[elpa] master a0f1e25 021/272: ivy.el (ivy-completion-in-region): Fix log 0 issue |
Date: |
Mon, 25 Apr 2016 10:13:14 +0000 |
branch: master
commit a0f1e25c632a219a8054932cdde860fc61c4e57b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-completion-in-region): Fix log 0 issue
---
ivy.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/ivy.el b/ivy.el
index b83c7b4..c70fa65 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1382,19 +1382,19 @@ 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))
- (w (1+ (floor (log (length comps) 10))))
- (ivy-count-format (format "%%-%dd " w)))
+ (comps (all-completions str collection predicate)))
(if (null comps)
(message "No matches")
- (setq ivy-completion-beg start)
- (setq ivy-completion-end end)
- (and
- (ivy-read (format "(%s): " str) comps
- :predicate predicate
- :action #'ivy-completion-in-region-action
- :require-match t)
- t))))
+ (let* ((w (1+ (floor (log (length comps) 10))))
+ (ivy-count-format (format "%%-%dd " w)))
+ (setq ivy-completion-beg start)
+ (setq ivy-completion-end end)
+ (and
+ (ivy-read (format "(%s): " str) comps
+ :predicate predicate
+ :action #'ivy-completion-in-region-action
+ :require-match t)
+ t)))))
;;;###autoload
(define-minor-mode ivy-mode
- [elpa] master cabab4b 012/272: swiper.el (swiper-font-lock-ensure): Add bongo-library-mode, (continued)
- [elpa] master cabab4b 012/272: swiper.el (swiper-font-lock-ensure): Add bongo-library-mode, Oleh Krehel, 2016/04/25
- [elpa] master 2c50031 004/272: Fix ivy-reverse-i-search broken by recursive update, Oleh Krehel, 2016/04/25
- [elpa] master 6951eba 001/272: Make ivy--regex-plus recognize ! at the beginning of the str, Oleh Krehel, 2016/04/25
- [elpa] master d74fab4 010/272: counsel.el (counsel-M-x): Let-bind this-command, Oleh Krehel, 2016/04/25
- [elpa] master fd27465 014/272: counsel.el (counsel-git): Fix window selection, Oleh Krehel, 2016/04/25
- [elpa] master 6bf72fd 008/272: counsel.el (counsel-imenu): Work when given positions are overlays, Oleh Krehel, 2016/04/25
- [elpa] master 63be079 009/272: ivy.el (ivy-re-builders-alist): Allow this-command to be a key, Oleh Krehel, 2016/04/25
- [elpa] master 09848ca 013/272: Add cousel-ag-base-command var, Oleh Krehel, 2016/04/25
- [elpa] master adfad96 007/272: support imenu, Oleh Krehel, 2016/04/25
- [elpa] master d09a16b 011/272: swiper.el (swiper-font-lock-ensure): Add bongo-playlist-mode, Oleh Krehel, 2016/04/25
- [elpa] master a0f1e25 021/272: ivy.el (ivy-completion-in-region): Fix log 0 issue,
Oleh Krehel <=
- [elpa] master df1dc78 019/272: counsel.el (counsel-find-file): Add initial-input, Oleh Krehel, 2016/04/25
- [elpa] master 2ea56ec 027/272: ivy.el (ivy-occur): Fix when ivy--old-re isn't a string, Oleh Krehel, 2016/04/25
- [elpa] master db3e7ff 015/272: Ensure the return result of `ivy-read', Oleh Krehel, 2016/04/25
- [elpa] master e070f4c 022/272: ivy.el (ivy-add-face-text-property): New defun, Oleh Krehel, 2016/04/25
- [elpa] master 89ed4d6 024/272: Improve flx highlighting, Oleh Krehel, 2016/04/25
- [elpa] master 09cb5c9 025/272: ivy: fix ivy--resize-minibuffer-to-fit for small delta, Oleh Krehel, 2016/04/25
- [elpa] master 6051225 020/272: Call ivy-set-actions with t to affect all commands, Oleh Krehel, 2016/04/25
- [elpa] master 12523d0 023/272: Use flx for highlighting fuzzy matches, Oleh Krehel, 2016/04/25
- [elpa] master 1cd501a 029/272: ivy.el (ivy-completion-in-region): Optimize for 1 cand, Oleh Krehel, 2016/04/25
- [elpa] master 0c844c1 030/272: ivy.el (ivy-completion-in-region): Fix for 1 cand, Oleh Krehel, 2016/04/25