[vim] fix cursor restoration w/vim-vinegar

pull/28/head
Alpha Chen 7 years ago
parent 37eb2bdc6a
commit a51fdb60ff

@ -88,7 +88,8 @@ set virtualedit=block
set noshowmode set noshowmode
function! RestoreCursor() function! RestoreCursor()
if line("'\"") <= line("$") let pos = line("'\"")
if pos > 0 && pos <= line("$")
normal! g`"zz normal! g`"zz
return 1 return 1
endif endif

Loading…
Cancel
Save