branch: externals/ivy-hydra
commit 1933f6de304f14aecf937ca37578436ba5c95ebf
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-resume): Don't re-calculate for :dynamic-collection
Fixes #2477
---
ivy.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index 9df29bf..ca70f79 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2412,7 +2412,9 @@ This is useful for recursive `ivy-read'."
counsel-switch-buffer)))
predicate)))
(dynamic-collection
- (setq coll (ivy--dynamic-collection-cands (or initial-input ""))))
+ (setq coll (if (eq this-command 'ivy-resume)
+ ivy--all-candidates
+ (ivy--dynamic-collection-cands (or initial-input
"")))))
((consp (car-safe collection))
(setq collection (cl-remove-if-not predicate collection))
(when (and sort (setq sort-fn (ivy--sort-function caller)))
@@ -3377,7 +3379,8 @@ Should be run via minibuffer `post-command-hook'."
;; "Waiting for process to die...done" message interruptions
(let ((inhibit-message t)
coll in-progress)
- (unless (equal ivy--old-text ivy-text)
+ (unless (or (equal ivy--old-text ivy-text)
+ (eq this-command 'ivy-resume))
(while-no-input
(setq coll (ivy--dynamic-collection-cands ivy-text))
(when (eq coll 0)