Skip to content

Commit

Permalink
added keepjumps to preserve jumplist
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliskoncevicius committed Mar 4, 2019
1 parent db78236 commit b4a8b8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/sendtosplit.vim
Expand Up @@ -4,11 +4,11 @@ function! s:SendToWindow(type, direction)
let s:saved_pos=getpos(".")
" Obtain wanted text
if a:type == 'v' || a:type=='V' || a:type=="\<C-V>"
normal! `<v`>y
keepjumps normal! `<v`>y
elseif a:type ==# "char"
normal! `[v`]y
keepjumps normal! `[v`]y
elseif a:type ==# "line"
normal! `[V`]$y
keepjumps normal! `[V`]$y
endif
" Was the cursor at the end of line?
call setpos(".", getpos("'>"))
Expand Down

0 comments on commit b4a8b8c

Please sign in to comment.