From 532f3db6be8c6e123abb3f6523c419b6b19436da Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 10 Apr 2018 12:12:15 +0200 Subject: [PATCH] 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 --- plugin/startify.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/startify.vim b/plugin/startify.vim index 5e915e6..70f68d2 100644 --- a/plugin/startify.vim +++ b/plugin/startify.vim @@ -33,7 +33,7 @@ function! s:update_oldfiles(file) endfunction function! s:on_vimenter() - if !argc() + if !argc() && line2byte('$') == -1 if get(g:, 'startify_session_autoload') && filereadable('Session.vim') source Session.vim elseif !get(g:, 'startify_disable_at_vimenter')