mirror of
https://github.com/tpope/vim-sensible.git
synced 2025-11-11 12:33:47 -05:00
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:
@@ -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')
|
redir => out
|
||||||
let out = execute('verbose setglobal ' . a:option . '?')
|
silent verbose execute 'setglobal termcap' a:option . '?'
|
||||||
else
|
redir END
|
||||||
redir => out
|
return out !~# " \\~[\\/][^\n]*$"
|
||||||
silent verbose execute 'setglobal' a:option . '?'
|
|
||||||
redir END
|
|
||||||
endif
|
|
||||||
return out !~# ' \~[\/]'
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
if s:MaySet('backspace')
|
if s:MaySet('backspace')
|
||||||
|
|||||||
Reference in New Issue
Block a user