Check for empty buffer on VimEnter
We check if files were given on the command-line already, but argc() is 0 when Vim is used as a $MANPAGER. So, only run Startify if the first buffer is actually empty. Fixes #310
This commit is contained in:
parent
2cd1664470
commit
532f3db6be
|
@ -33,7 +33,7 @@ function! s:update_oldfiles(file)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:on_vimenter()
|
function! s:on_vimenter()
|
||||||
if !argc()
|
if !argc() && line2byte('$') == -1
|
||||||
if get(g:, 'startify_session_autoload') && filereadable('Session.vim')
|
if get(g:, 'startify_session_autoload') && filereadable('Session.vim')
|
||||||
source Session.vim
|
source Session.vim
|
||||||
elseif !get(g:, 'startify_disable_at_vimenter')
|
elseif !get(g:, 'startify_disable_at_vimenter')
|
||||||
|
|
Loading…
Reference in a new issue