branch: master
commit bae6fb15d0fcf0a91f3afa599c921480fcf680a7
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    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 files changed, 2 insertions(+), 1 deletions(-)

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

Reply via email to