branch: externals/ivy-hydra
commit ec16352bbe38ffbaa1e5216f061e3158a4a66bf8
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-resume): Check that :action is not identity
Fixes #2500
---
ivy.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index d8ae33d..5c9b741 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1257,7 +1257,8 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(defun ivy-resume ()
"Resume the last completion session."
(interactive)
- (if (null (ivy-state-action ivy-last))
+ (if (or (null (ivy-state-action ivy-last))
+ (eq (ivy--get-action ivy-last) 'identity))
(user-error "The last session isn't compatible with `ivy-resume'")
(when (memq (ivy-state-caller ivy-last)
'(swiper swiper-isearch swiper-backward
swiper-isearch-backward))