branch: master
commit da9d937cfb8067a1d01aa127371624aff11d9243
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    ivy.el (ivy-call): Allow ivy-inhibit-action to be a function
---
 ivy.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 8f5acd2..211c110 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1286,8 +1286,11 @@ will be called for each element of this list.")
                                ivy-alt-done
                                ivy-dispatching-done))
     (setq ivy-current-prefix-arg current-prefix-arg))
-  (let ((action (and (not ivy-inhibit-action)
-                     (ivy--get-action ivy-last))))
+  (let ((action
+         (if (functionp ivy-inhibit-action)
+             ivy-inhibit-action
+           (and (not ivy-inhibit-action)
+                (ivy--get-action ivy-last)))))
     (when action
       (let* ((collection (ivy-state-collection ivy-last))
              (current (ivy-state-current ivy-last))

Reply via email to