Răsfoiți Sursa

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
Marco Hinz 7 ani în urmă
părinte
comite
532f3db6be
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      plugin/startify.vim

+ 1 - 1
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')