aboutsummaryrefslogtreecommitdiff
path: root/autoload/keep_position.vim
blob: a2f2ed4f41b6fab74b323e5f671c9dd9a176c8bc (plain) (blame)
1
2
3
4
5
function! keep_position#(command) abort
  let view = winsaveview()
  execute a:command
  call winrestview(view)
endfunction