From a877908acd2afc6821dddcac1ee551fced32d51d Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 30 Jul 2018 01:29:10 -0400 Subject: [PATCH] Fix check for absolute path in FugitiveGenerate() --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index b0e1f7e..492dc72 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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)