branch: externals/ivy-hydra commit 57c7d7c425956038e22f94441017fa3191829691 Author: Clemens Radermacher <clem...@posteo.net> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Call actions with default-directory bound to last state dir Fixes #2375 --- ivy.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ivy.el b/ivy.el index 68e8f58..e092118 100644 --- a/ivy.el +++ b/ivy.el @@ -1536,10 +1536,13 @@ See variable `ivy-recursive-restore' for further information." ivy-marked-candidates)) (multi-action (ivy--get-multi-action ivy-last))) (if multi-action - (funcall multi-action marked-candidates) + (let ((default-directory (ivy-state-directory ivy-last))) + (funcall multi-action marked-candidates)) (dolist (c marked-candidates) - (funcall action c)))) - (funcall action x)) + (let ((default-directory (ivy-state-directory ivy-last))) + (funcall action c))))) + (let ((default-directory (ivy-state-directory ivy-last))) + (funcall action x))) (ivy-recursive-restore)) (unless (or (eq ivy-exit 'done) (minibuffer-window-active-p (selected-window))