branch: master commit 0c844c1ee631b2b2bc1129f063922e4a2bbd9b91 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
ivy.el (ivy-completion-in-region): Fix for 1 cand Set `ivy-state-window' properly. --- ivy.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ivy.el b/ivy.el index b730f78..3e93d76 100644 --- a/ivy.el +++ b/ivy.el @@ -1404,7 +1404,11 @@ The previous string is between `ivy-completion-beg' and `ivy-completion-end'." (setq ivy-completion-beg (- end (ivy-completion-common-length (car comps)))) (setq ivy-completion-end end) (if (null (cdr comps)) - (ivy-completion-in-region-action (car comps)) + (progn + (setf (ivy-state-window ivy-last) (selected-window)) + (ivy-completion-in-region-action + (substring-no-properties + (car comps)))) (let* ((w (1+ (floor (log (length comps) 10)))) (ivy-count-format (and ivy-count-format (format "%%-%dd " w))))