diff --git a/plug.vim b/plug.vim index 5c9bd34..ab0e082 100644 --- a/plug.vim +++ b/plug.vim @@ -334,11 +334,11 @@ function! s:progress_opt(base) \ s:git_version_requirement(1, 7, 1) ? '--progress' : '' endfunction -if s:is_win - function! s:rtp(spec) - return s:path(a:spec.dir . get(a:spec, 'rtp', '')) - endfunction +function! s:rtp(spec) + return s:path(a:spec.dir . get(a:spec, 'rtp', '')) +endfunction +if s:is_win function! s:path(path) return s:trim(substitute(a:path, '/', '\', 'g')) endfunction @@ -376,10 +376,6 @@ if s:is_win return [batchfile, cmd] endfunction else - function! s:rtp(spec) - return s:dirpath(a:spec.dir . get(a:spec, 'rtp', '')) - endfunction - function! s:path(path) return s:trim(a:path) endfunction