]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy--reset-state): Less strict on :preselect
authorOleh Krehel <ohwoeowho@gmail.com>
Fri, 2 Oct 2015 10:30:10 +0000 (12:30 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Fri, 2 Oct 2015 10:30:26 +0000 (12:30 +0200)
ivy.el

diff --git a/ivy.el b/ivy.el
index f9d093b78e47928cf931d33b71132e7fcaf1d99f..25ea6c6aee971363a10f07d9e342e6220173e9a4 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -998,7 +998,7 @@ This is useful for recursive `ivy-read'."
       (when preselect
         (unless (or (and require-match
                          (not (eq collection 'internal-complete-buffer)))
-                    (let ((re (format "\\`%s" (regexp-quote preselect))))
+                    (let ((re (regexp-quote preselect)))
                       (cl-find-if (lambda (x) (string-match re x))
                                   coll)))
           (setq coll (cons preselect coll))))