Jelajahi Sumber

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 tahun lalu
induk
melakukan
50971a4862
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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')