emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/ivy a524df6 2/2: Merge branch 'master' into externals/i


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy a524df6 2/2: Merge branch 'master' into externals/ivy
Date: Tue, 27 Jul 2021 11:20:14 -0400 (EDT)

branch: externals/ivy
commit a524df61f9bbc53f26c22d6aaabaff7a6170e5ec
Merge: 4df2023 1642e20
Author: Basil L. Contovounesios <contovob@tcd.ie>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Merge branch 'master' into externals/ivy
---
 ivy.el | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 5ef1a30..908f399 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4877,9 +4877,16 @@ You can also delete an element from history with 
\\[ivy-reverse-i-search-kill]."
   (delete-minibuffer-contents)
   (if (ivy-state-dynamic-collection ivy-last)
       (progn
-        (setf (ivy-state-dynamic-collection ivy-last) nil)
-        (setf (ivy-state-collection ivy-last)
-              (setq ivy--all-candidates ivy--old-cands)))
+        ;; By disabling `ivy-state-dynamic-collection', we lose the ability
+        ;; to clearly differentiate between ternary programmed completion
+        ;; functions and Ivy's unary dynamic collections (short of using
+        ;; `func-arity' or otherwise redesigning things).  So we must also
+        ;; update the dynamic binding of `minibuffer-completion-table' to no
+        ;; longer hold a dynamic collection.
+        (setq minibuffer-completion-table ivy--old-cands)
+        (setq ivy--all-candidates ivy--old-cands)
+        (setf (ivy-state-collection ivy-last) ivy--old-cands)
+        (setf (ivy-state-dynamic-collection ivy-last) nil))
     (setq ivy--all-candidates
           (ivy--filter ivy-text ivy--all-candidates))))
 



reply via email to

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