[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5c03c2b 18/22: ivy.el (ivy-read): Fix preselect logic
From: |
Oleh Krehel |
Subject: |
[elpa] master 5c03c2b 18/22: ivy.el (ivy-read): Fix preselect logic |
Date: |
Wed, 22 Apr 2015 19:51:52 +0000 |
branch: master
commit 5c03c2bdbdb96aa0be1b607d061223be48d47e2d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-read): Fix preselect logic
* ivy.el (ivy-read): Update.
Fixes e.g. `ert' passing "t" as the default, which isn't in collection,
but `all-completions' doesn't return nil.
---
ivy.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ivy.el b/ivy.el
index 7311077..a679f74 100644
--- a/ivy.el
+++ b/ivy.el
@@ -480,7 +480,7 @@ When SORT is t, refer to `ivy-sort-functions-alist' for
sorting."
(setq coll (cl-sort (copy-sequence coll) sort-fn)))))
(when preselect
(unless (or require-match
- (all-completions preselect collection))
+ (member preselect coll))
(setq coll (cons preselect coll))))
(setq ivy--index (or
(and preselect
- [elpa] master 6da7819 09/22: ivy.el (ivy--filter): Update prefix optimization, (continued)
- [elpa] master 6da7819 09/22: ivy.el (ivy--filter): Update prefix optimization, Oleh Krehel, 2015/04/22
- [elpa] master 533b788 11/22: ivy.el (ivy-done): Be more strict for `require-match', Oleh Krehel, 2015/04/22
- [elpa] master fb805a0 08/22: README.md: Add a note on outdated ivy package, Oleh Krehel, 2015/04/22
- [elpa] master 70c5fe8 13/22: Bind "M-q" to `ivy-toggle-regexp-quote', Oleh Krehel, 2015/04/22
- [elpa] master 7edfbc9 14/22: ivy.el (ivy--exhibit): Wrap in `while-no-input', Oleh Krehel, 2015/04/22
- [elpa] master 1fad831 10/22: Change `ivy-read' to a cl-defun, Oleh Krehel, 2015/04/22
- [elpa] master e78557a 15/22: swiper.el (swiper--ivy): Fix preselect being added, Oleh Krehel, 2015/04/22
- [elpa] master 28abaa9 12/22: Allow to customize the regex matching per-collection, Oleh Krehel, 2015/04/22
- [elpa] master dd4aced 16/22: ivy.el (ivy--add-face): Don't fail for weird str, Oleh Krehel, 2015/04/22
- [elpa] master 6d801a6 19/22: ivy-test.el (ivy-read): Update test., Oleh Krehel, 2015/04/22
- [elpa] master 5c03c2b 18/22: ivy.el (ivy-read): Fix preselect logic,
Oleh Krehel <=
- [elpa] master f9947de 20/22: Fixup `swiper-query-replace', Oleh Krehel, 2015/04/22
- [elpa] master 632af83 17/22: ivy.el (ivy-done): Fixup, Oleh Krehel, 2015/04/22
- [elpa] master e2452a3 21/22: README.md: Update video link, Oleh Krehel, 2015/04/22
- [elpa] master c7a6156 22/22: Merge commit 'e2452a3e77ef6ea6b193292d2c0bbbe93dd4b078' from swiper, Oleh Krehel, 2015/04/22