Prechádzať zdrojové kódy

Nvim: adjust VimEnter check due to upstream change

Due to a recent change in Nvim [1], our VimEnter check wasn't firing anymore and
thus Startify wouldn't run at startup.

The line2byte() "trick" was replaced by less abusing VimL.

[1]: https://github.com/neovim/neovim/commit/b051b131f5ce99ffe1b1bc22a2032ebc886e4e35

Fixes https://github.com/mhinz/vim-startify/issues/549
Marco Hinz 2 rokov pred
rodič
commit
50971a4862
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      plugin/startify.vim

+ 1 - 1
plugin/startify.vim

@@ -34,7 +34,7 @@ function! s:update_oldfiles(file)
 endfunction
 
 function! s:on_vimenter()
-  if !argc() && line2byte('$') == -1
+  if !argc() && line('$') == 1 && getline('.') == ''
     if get(g:, 'startify_session_autoload') && filereadable('Session.vim')
       source Session.vim
     elseif !get(g:, 'startify_disable_at_vimenter')