From abf880f12f5a7c5f51717fdfdf7ac00ad69a289e Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Wed, 30 Mar 2016 21:19:37 +0200 Subject: [PATCH] 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 964a94757..0a7e11501 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)))))) -- 2.39.2