branch: master
commit ea6525e6bdddb6c4c7d175613aa1d6536afd0a1b
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-read): Improve ivy-set-actions interaction
* ivy.el (ivy-read): When the base action is already a list, merge it
with the one obtained from `ivy-set-actions'.
---
ivy.el | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index 876204f..58b2529 100644
--- a/ivy.el
+++ b/ivy.el
@@ -800,9 +800,11 @@ candidates with each input."
(let ((extra-actions (plist-get ivy--actions-list this-command)))
(when extra-actions
(setq action
- `(1
- ("default" ,action)
- ,@extra-actions))))
+ (if (functionp action)
+ `(1
+ ("default" ,action)
+ ,@extra-actions)
+ (delete-dups (append action extra-actions))))))
(setq ivy-last
(make-ivy-state
:prompt prompt