[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 230137b 047/184: ivy.el (ivy-restrict-to-matches): Work fo

From: Oleh Krehel
Subject: [elpa] master 230137b 047/184: ivy.el (ivy-restrict-to-matches): Work for dynamic collection
Date: Wed, 16 Oct 2019 13:14:46 -0400 (EDT)

branch: master
commit 230137be3ea4cce20bed0689481c4fc4394c3867
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-restrict-to-matches): Work for dynamic collection
    Re #2168
 ivy.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 5b41319..3427cdb 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4467,8 +4467,12 @@ You can also delete an element from history with 
   "Restrict candidates to current input and erase input."
-  (setq ivy--all-candidates
-        (ivy--filter ivy-text ivy--all-candidates)))
+  (if (ivy-state-dynamic-collection ivy-last)
+      (progn
+        (setf (ivy-state-dynamic-collection ivy-last) nil)
+        (setq ivy--all-candidates ivy--old-cands))
+    (setq ivy--all-candidates
+          (ivy--filter ivy-text ivy--all-candidates))))
 ;;* Occur
 (defvar-local ivy-occur-last nil

reply via email to

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