branch: externals/ivy-hydra
commit 9ccd93bb27b23472aed07c2f67521a900135c551
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy-hydra.el (ivy-hydra-read-action): Work for "C-M-o"
Change action for one call, and restore it to the old setting.
Fixes #2514
---
ivy-hydra.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/ivy-hydra.el b/ivy-hydra.el
index 1dd039d..3bf31c5 100644
--- a/ivy-hydra.el
+++ b/ivy-hydra.el
@@ -119,9 +119,12 @@ _h_ ^+^ _l_ | _d_one ^ ^ | _o_ops | _M_: matcher
%-5s(ivy--matcher-desc)
,@(mapcar (lambda (x)
(list (nth 0 x)
`(progn
- (setcar (ivy-state-action ivy-last) ,(cl-incf
i))
- ,(when (eq ivy-exit 'ivy-dispatching-done)
- '(ivy-done)))
+ (let ((prev-idx (car (ivy-state-action
ivy-last))))
+ (setcar (ivy-state-action ivy-last)
,(cl-incf i))
+ ,@(if (eq ivy-exit 'ivy-dispatching-done)
+ '((ivy-done))
+ '((ivy-call)
+ (setcar (ivy-state-action ivy-last)
prev-idx)))))
(nth 2 x)))
(cdr actions))
,@extra-actions)))