From 2e691c6feb42bb4c245324178674f483f87462b7 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 29 Jul 2014 10:09:05 +0900 Subject: [PATCH] Define a separate version of s:is_local_plug for Windows --- plug.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plug.vim b/plug.vim index d2cb48c..4c68495 100644 --- a/plug.vim +++ b/plug.vim @@ -212,6 +212,10 @@ if s:is_win function! s:dirpath(path) return s:path(a:path) . '\' endfunction + + function! s:is_local_plug(repo) + return a:repo =~? '^[a-z]:' + endfunction else function! s:rtp(spec) return s:dirpath(a:spec.dir . get(a:spec, 'rtp', '')) @@ -224,6 +228,10 @@ else function! s:dirpath(path) return s:trim(a:path) . '/' endfunction + + function! s:is_local_plug(repo) + return a:repo[0] =~ '[/$~]' + endfunction endif function! s:err(msg) @@ -363,10 +371,6 @@ function! s:extract_name(repo) return substitute(fnamemodify(a:repo, ':t'), '\.git$', '', '') endfunction -function! s:is_local_plug(repo) - return a:repo[0] =~ '[/$~]' || a:repo =~? '^[a-z]:' -endfunction - function! s:install(...) call s:update_impl(0, a:000) endfunction