branch: master
commit 7b453c865213f51e2a98424ecbb83c9e4a1c2d8d
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy-completion-in-region-action): Work for cons cells
It's often useful to display one thing and insert a (slightly) different
thing. Make it possible to reuse `ivy-completion-in-region-action' for
this.
---
ivy.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ivy.el b/ivy.el
index 1623132..29b7d01 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1805,6 +1805,8 @@ INHERIT-INPUT-METHOD is currently ignored."
(defun ivy-completion-in-region-action (str)
"Insert STR, erasing the previous one.
The previous string is between `ivy-completion-beg' and `ivy-completion-end'."
+ (when (consp str)
+ (setq str (cdr str)))
(when (stringp str)
(let ((fake-cursors (and (featurep 'multiple-cursors)
(mc/all-fake-cursors)))