From 8fe08f19445b3eae87a931a16998bb7b65950b51 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 28 Sep 2013 23:43:01 +0900 Subject: [PATCH] Remove trailing backslash from rtp on Windows --- plug.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plug.vim b/plug.vim index 8cf6df3..9acf456 100644 --- a/plug.vim +++ b/plug.vim @@ -106,7 +106,11 @@ function! plug#end() endfunction function! s:rtp(spec) - return s:dirpath(a:spec.dir . get(a:spec, 'rtp', '')) + let rtp = s:dirpath(a:spec.dir . get(a:spec, 'rtp', '')) + if s:is_win + let rtp = substitute(rtp, '\\*$', '', '') + endif + return rtp endfunction function! s:add(...)