Display error message if plug#end is called before plug#begin
This commit is contained in:
parent
a439a02ff7
commit
b9174c366f
1 changed files with 4 additions and 0 deletions
4
plug.vim
4
plug.vim
|
@ -91,6 +91,10 @@ function! plug#begin(...)
|
|||
endfunction
|
||||
|
||||
function! plug#end()
|
||||
if !exists('g:plugs')
|
||||
echoerr 'Call plug#begin() first'
|
||||
return
|
||||
endif
|
||||
let keys = keys(g:plugs)
|
||||
while !empty(keys)
|
||||
let keys = keys(s:extend(keys))
|
||||
|
|
Loading…
Reference in a new issue