Use setreg() to preserve yanked text's -wise mode
This commit is contained in:
parent
07d9946872
commit
a0e2169959
@ -6,12 +6,12 @@ function! s:exchange(x, y)
|
||||
|
||||
call setpos("'a", a:y[2])
|
||||
call setpos("'b", a:y[3])
|
||||
let @@ = a:x[0]
|
||||
call setreg('@', a:x[0], a:x[1])
|
||||
silent exe "normal! `a" . a:y[1] . "`b\"\"p"
|
||||
|
||||
call setpos("'a", a:x[2])
|
||||
call setpos("'b", a:x[3])
|
||||
let @@ = a:y[0]
|
||||
call setreg('@', a:y[0], a:y[1])
|
||||
silent exe "normal! `a" . a:x[1] . "`b\"\"p"
|
||||
|
||||
call setpos("'a", a)
|
||||
|
Loading…
Reference in New Issue
Block a user