From 42a42e7e71f8bca72f4a9f194a9d54eb5b0089f2 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 10 Jul 2014 00:13:32 +0900 Subject: [PATCH] Fix `after` directory and `Plugfile` on Windows --- plug.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plug.vim b/plug.vim index 20101c5..c420b1d 100644 --- a/plug.vim +++ b/plug.vim @@ -193,8 +193,9 @@ endfunction function! s:add_rtp(rtp) execute "set rtp^=".s:esc(a:rtp) - if isdirectory(a:rtp.'after') - execute "set rtp+=".s:esc(a:rtp.'after') + let after = globpath(a:rtp, 'after') + if isdirectory(after) + execute "set rtp+=".s:esc(after) endif endfunction @@ -424,7 +425,7 @@ function! s:extend(names) try command! -nargs=+ Plug call s:add(0, ) for name in a:names - let plugfile = s:rtp(g:plugs[name]) . s:plug_file + let plugfile = globpath(s:rtp(g:plugs[name]), s:plug_file) if filereadable(plugfile) execute "source ". s:esc(plugfile) endif