mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-19 10:35:38 -07:00
Clarify error message (#931)
The existing error message printed when plug#end() is called without calling plug#begin() doesn't make the dependence on plug#begin() obvious; I had to go digging in the vim-plug code to discover what I'd done wrong. This attempts to clarify the error a bit, to make it more obvious to a user.
This commit is contained in:
parent
2f5f74e5e6
commit
c3b6b7c297
2
plug.vim
2
plug.vim
@ -251,7 +251,7 @@ endfunction
|
|||||||
|
|
||||||
function! plug#end()
|
function! plug#end()
|
||||||
if !exists('g:plugs')
|
if !exists('g:plugs')
|
||||||
return s:err('Call plug#begin() first')
|
return s:err('plug#end() called without calling plug#begin() first')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('#PlugLOD')
|
if exists('#PlugLOD')
|
||||||
|
@ -2,7 +2,7 @@ Execute (plug#end() before plug#begin() should fail):
|
|||||||
redir => out
|
redir => out
|
||||||
silent! AssertEqual 0, plug#end()
|
silent! AssertEqual 0, plug#end()
|
||||||
redir END
|
redir END
|
||||||
Assert stridx(out, 'Call plug#begin() first') >= 0
|
Assert stridx(out, 'plug#end() called without calling plug#begin() first') >= 0
|
||||||
|
|
||||||
Execute (plug#begin() without path argument):
|
Execute (plug#begin() without path argument):
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
|
Loading…
Reference in New Issue
Block a user