File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -298,7 +298,15 @@ function! plug#end()
298298 if has (' syntax' ) && ! exists (' g:syntax_on' )
299299 syntax enable
300300 end
301+
302+ " NOTE: v:vim_did_enter might not exist with older Vims, and handling it
303+ " manually can be used in tests.
304+ let s: vim_did_enter = 0
305+ augroup PlugLOD
306+ autocmd VimEnter * let s: vim_did_enter = 1
307+ augroup END
301308 else
309+ let s: vim_did_enter = 1
302310 call s: reload_plugins ()
303311 endif
304312endfunction
@@ -522,7 +530,7 @@ function! s:lod_ft(pat, names)
522530
523531 " Executing this is only necessary if "filetype plugin indent on" was used
524532 " before plug#end, and can be skipped when Vim has not entered always.
525- if v : vim_did_enter
533+ if s : vim_did_enter
526534 if s: need_filetypeplugin_au
527535 call s: doautocmd (' filetypeplugin' , ' FileType' )
528536 endif
You can’t perform that action at this time.
0 commit comments