branch: master commit abf880f12f5a7c5f51717fdfdf7ac00ad69a289e Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
ivy.el (ivy-read): Make "M-o" not modify the action Re #454 --- ivy.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ivy.el b/ivy.el index 964a947..0a7e115 100644 --- a/ivy.el +++ b/ivy.el @@ -1281,7 +1281,9 @@ customizations apply to the current completion session." (transformer-fn (plist-get ivy--display-transformers-list (or caller (and (functionp collection) - collection))))) + collection)))) + (original-action (and (consp action) + (copy-sequence action)))) (setq ivy-last (make-ivy-state :prompt prompt @@ -1337,6 +1339,8 @@ customizations apply to the current completion session." (when recursive-ivy-last (ivy--reset-state (setq ivy-last recursive-ivy-last))))) (ivy-call) + (when original-action + (setf (ivy-state-action ivy-last) original-action)) (when (and recursive-ivy-last ivy-recursive-restore) (ivy--reset-state (setq ivy-last recursive-ivy-last))))))