]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-completing-read): Rely more on `all-completions'
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 16 Apr 2015 17:19:38 +0000 (19:19 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 16 Apr 2015 17:20:06 +0000 (19:20 +0200)
ivy.el

diff --git a/ivy.el b/ivy.el
index bb0306a1e41cc3a5b4704a1fb6709687954c10ed..d374deadfe6696ca18ecd9a71a85e9852fa05f2a 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -4,7 +4,7 @@
 
 ;; Author: Oleh Krehel <ohwoeowho@gmail.com>
 ;; URL: https://github.com/abo-abo/swiper
-;; Version: 0.2.2
+;; Version: 0.2.3
 ;; Package-Requires: ((emacs "24.1"))
 ;; Keywords: matching
 
@@ -256,15 +256,15 @@ DEF is the default value.
 _INHERIT-INPUT-METHOD is ignored for now.
 
 The history, defaults and input-method arguments are ignored for now."
-  (cond ((functionp collection)
-         (setq collection (all-completions "" collection))
+  (cond ((or (functionp collection)
+             (vectorp collection))
+         (setq collection (all-completions "" collection predicate))
+         ;; find-file is problematic
          (setq initial-input nil))
         ((hash-table-p collection)
          (error "Hash table as a collection unsupported"))
         ((listp (car collection))
-         (setq collection (mapcar #'car collection))))
-  (when predicate
-    (setq collection (cl-remove-if-not predicate collection)))
+         (setq collection (all-completions "" collection predicate))))
   (when (listp def)
     (setq def (car def)))
   (setq ivy-require-match require-match)