Add plugin to &rtp before running post-update hook with : prefix
Close #593
This commit is contained in:
parent
e80a93d5d0
commit
f551a71688
2 changed files with 13 additions and 0 deletions
4
plug.vim
4
plug.vim
|
@ -820,6 +820,10 @@ function! s:do(pull, force, todo)
|
|||
let type = type(spec.do)
|
||||
if type == s:TYPE.string
|
||||
if spec.do[0] == ':'
|
||||
if !get(s:loaded, name, 0)
|
||||
let s:loaded[name] = 1
|
||||
call s:reorg_rtp()
|
||||
endif
|
||||
call s:load_plugin(spec)
|
||||
try
|
||||
execute spec.do[1:]
|
||||
|
|
|
@ -332,3 +332,12 @@ Execute (Cursor moved to another window during post-update hook):
|
|||
AssertEqual 'empty', getline(1)
|
||||
q!
|
||||
q
|
||||
|
||||
**********************************************************************
|
||||
Execute (#593 Add plugin to &rtp before running post-update hook with : prefix):
|
||||
call ReloadPlug()
|
||||
call plug#begin()
|
||||
Plug 'junegunn/vim-pseudocl', { 'on': 'XXX', 'do': ':let g:bar = pseudocl#complete#extract_words(''a b'')' }
|
||||
call plug#end()
|
||||
PlugInstall!
|
||||
AssertEqual ['a', 'b'], g:bar
|
||||
|
|
Loading…
Reference in a new issue