瀏覽代碼

Inline substitute inside s:dirpath()

Andrea Cedraro 11 年之前
父節點
當前提交
6af2cd8946
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plug.vim

+ 1 - 1
plug.vim

@@ -226,7 +226,7 @@ else
   endfunction
 
   function! s:dirpath(path)
-    return s:trim(a:path) . '/'
+    return substitute(a:path, '[/\\]*$', '/', '')
   endfunction
 
   function! s:is_local_plug(repo)