Display error message if plug#end is called before plug#begin

This commit is contained in:
Junegunn Choi 2014-01-18 15:06:06 +09:00
parent a439a02ff7
commit b9174c366f

View file

@ -91,6 +91,10 @@ function! plug#begin(...)
endfunction endfunction
function! plug#end() function! plug#end()
if !exists('g:plugs')
echoerr 'Call plug#begin() first'
return
endif
let keys = keys(g:plugs) let keys = keys(g:plugs)
while !empty(keys) while !empty(keys)
let keys = keys(s:extend(keys)) let keys = keys(s:extend(keys))