commit 7079d0c7e28bee6d617557e467abb3b5217154a9 (tree)
parent 4f51d99f44b2e86bae6d838ed81a668c29df91cc
Author: Tim Pope <code@tpope.net>
Date: Thu, 15 Aug 2019 21:59:27 -0400
Convert all FugitivePrepare() int arguments to buffer names
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -324,6 +324,11 @@ function! s:PreparePathArgs(cmd, dir, literal) abort
call insert(a:cmd, '--literal-pathspecs')
endif
let split = index(a:cmd, '--')
+ for i in range(split < 0 ? len(a:cmd) : split)
+ if type(a:cmd[i]) == type(0)
+ let a:cmd[i] = fugitive#Path(bufname(a:cmd[i]), './', a:dir)
+ endif
+ endfor
if split < 0
return a:cmd
endif