branch: externals/ivy-hydra
commit 4b4f7c8c37314be92d9e4971687e987fb7b3ef3e
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
swiper.el (swiper-occur): Works with marked candidates
Re #2470
---
ivy.el | 1 +
swiper.el | 1 +
2 files changed, 2 insertions(+)
diff --git a/ivy.el b/ivy.el
index 14e382c..bcfae36 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1413,6 +1413,7 @@ If the input is empty, select the previous history
element instead."
(let* ((action (ivy-state-action state))
(multi-action
(and (listp action)
+ (not (eq (car action) 'lambda))
(nth 3 (nth (car action) action)))))
(if multi-action
multi-action
diff --git a/swiper.el b/swiper.el
index 8f936f8..bfc0e58 100644
--- a/swiper.el
+++ b/swiper.el
@@ -670,6 +670,7 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
(defun swiper-occur (&optional cands)
"Generate a custom occur buffer for `swiper'.
When capture groups are present in the input, print them instead of lines."
+ (setq cands (or ivy-marked-candidates cands))
(let* ((buffer (swiper--occur-buffer))
(fname (propertize
(with-ivy-window