Fix check for absolute path in FugitiveGenerate()

This commit is contained in:
Tim Pope 2018-07-30 01:29:10 -04:00
parent 6c89a3675b
commit a877908acd

View File

@ -89,7 +89,7 @@ function! FugitivePath(...) abort
endfunction
function! FugitiveGenerate(...) abort
if a:0 && s:shellslash(a:0) =~# '^\%(\a\a\+:\)\=\%(a:\)\=/\|^[~$]'
if a:0 && s:shellslash(a:1) =~# '^\%(\a\a\+:\)\=\%(a:\)\=/\|^[~$]'
return a:1
endif
return fugitive#repo(FugitiveGitDir(a:0 > 1 ? a:2 : -1)).translate(a:0 ? a:1 : '', 1)