emacs-elpa-diffs
[Top][All Lists]
Advanced

[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



reply via email to

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