branch: master
commit 6f4d46b76a96082ebc1cfc4f2b4a73bf8c0aca82
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    Fix preselect for input "^"
    
    * ivy.el (ivy--filter): Update.
    
    Notably, e.g. `counsel-describe-variable' should properly preselect
    variable at point.
---
 ivy.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index ba7027b..e06c3dd 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1588,7 +1588,9 @@ CANDIDATES are assumed to be static."
                   (setq idx (cl-position (pop tail) cands)))
                 (setq ivy--index (or idx 0))))
           (setq ivy--index 0))
-        (when (and (string= name "") (not (equal ivy--old-re "")))
+        (when (and (or (string= name "")
+                       (string= name "^"))
+                   (not (equal ivy--old-re "")))
           (setq ivy--index
                 (or (ivy--preselect-index
                      cands

Reply via email to