]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-resume): Don't regexp-quote preselect
authorOleh Krehel <ohwoeowho@gmail.com>
Fri, 2 Oct 2015 11:48:09 +0000 (13:48 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Fri, 2 Oct 2015 11:48:09 +0000 (13:48 +0200)
`ivy--preselect-index' uses `cl-position' before trying to match regex,
so the string needs to be as is.

Fixes #245

ivy.el

diff --git a/ivy.el b/ivy.el
index bf3981a989349b17cc1ccc99a3cefd2d2dcafa1b..8839ba6caa7f36bbab0be3c56c472a853ce63992 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -454,7 +454,7 @@ If the text hasn't changed as a result, forward to `ivy-alt-done'."
    :history (ivy-state-history ivy-last)
    :preselect (unless (eq (ivy-state-collection ivy-last)
                           'read-file-name-internal)
-                (regexp-quote ivy--current))
+                ivy--current)
    :keymap (ivy-state-keymap ivy-last)
    :update-fn (ivy-state-update-fn ivy-last)
    :sort (ivy-state-sort ivy-last)