Avoid moving screen cursor during Vim startup

Search for "did_show" in Vim's do_set() to see why this works.

Resolves: https://github.com/tpope/vim-sensible/issues/182
This commit is contained in:
Tim Pope
2023-01-05 18:17:59 -05:00
parent 8e274c23e4
commit 947f613a09

View File

@@ -21,14 +21,10 @@ endif
" overriding options in the user's vimrc, but still override options in the " overriding options in the user's vimrc, but still override options in the
" system vimrc. " system vimrc.
function! s:MaySet(option) abort function! s:MaySet(option) abort
if exists('*execute')
let out = execute('verbose setglobal ' . a:option . '?')
else
redir => out redir => out
silent verbose execute 'setglobal' a:option . '?' silent verbose execute 'setglobal termcap' a:option . '?'
redir END redir END
endif return out !~# " \\~[\\/][^\n]*$"
return out !~# ' \~[\/]'
endfunction endfunction
if s:MaySet('backspace') if s:MaySet('backspace')