瀏覽代碼

Remove trailing backslash from rtp on Windows

Junegunn Choi 12 年之前
父節點
當前提交
8fe08f1944
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      plug.vim

+ 5 - 1
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(...)