abo-abo / avy

Jump to things in Emacs tree-style
1.72k stars 110 forks source link

avy-move-region does not move the region to a different buffer #187

Closed rangilin closed 7 years ago

rangilin commented 7 years ago

When I try to move a region in buffer A to buffer B, avy does not move the selected region in buffer A to B. Instead, it move the region to the cursor position in buffer A. Since avy-move-line can work in this scenario, I assume this is a bug in avy-move-region.

I can reproduce this issue with emacs -Q

Steps to reproduce:

Step 1: I want to move two aaaaaaa lines from src to desc, while my cursor is focused in desc buffer image Step2: Call avy-move-region, then press g, h image

What happen:

The lines got moved to the top of the src buffer, where the cursor was at. image

What I expcet:

The lines should get moved to the desc buffer, something like this: image

abo-abo commented 7 years ago

Thanks, please test.

rangilin commented 7 years ago

Looks good, thanks for the quick fix !