diff --git a/autoload/zvim.vim b/autoload/zvim.vim index 97a1019d9..e5e65866a 100644 --- a/autoload/zvim.vim +++ b/autoload/zvim.vim @@ -32,7 +32,7 @@ function! zvim#enter() abort endfunction function! zvim#format() abort - let save_cursor = getcurpos() + let save_cursor = getpos('.') normal! gg=G call setpos('.', save_cursor) endfunction