From bae6fb15d0fcf0a91f3afa599c921480fcf680a7 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Tue, 5 Jan 2016 11:13:18 +0100 Subject: [PATCH] avy.el (avy-copy-region): Keep same selectors for the second pass With `avy-all-windows' t, the call to `avy--line' would change the window. Fixes #121 Fixes #120 --- avy.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avy.el b/avy.el index 6d7a139..3cffb73 100644 --- a/avy.el +++ b/avy.el @@ -1167,7 +1167,8 @@ The window scope is determined by `avy-all-windows' or (interactive "P") (let ((initial-window (selected-window))) (avy-with avy-copy-region - (let* ((beg (avy--line arg)) + (let* ((beg (save-selected-window + (avy--line arg))) (end (avy--line arg)) (str (buffer-substring-no-properties beg