Better resolving of relative plugin dirs
Resolve folder names such as 'dir': 'some-repo-before-compat-break' in a Plug spec as relative to the g:plug_home directory, rather than the current working directory.
This commit is contained in:
parent
8b45742540
commit
50d0a1a5b5
4
plug.vim
4
plug.vim
|
@ -750,7 +750,9 @@ function! s:parse_options(arg)
|
||||||
endif
|
endif
|
||||||
call extend(opts, a:arg)
|
call extend(opts, a:arg)
|
||||||
if has_key(opts, 'dir')
|
if has_key(opts, 'dir')
|
||||||
let opts.dir = s:dirpath(s:plug_expand(opts.dir))
|
exe 'cd' fnameescape(g:plug_home)
|
||||||
|
let opts.dir = s:dirpath(fnamemodify(s:plug_expand(opts.dir), ':p'))
|
||||||
|
cd -
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
throw 'Invalid argument type (expected: string or dictionary)'
|
throw 'Invalid argument type (expected: string or dictionary)'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user