From 7079d0c7e28bee6d617557e467abb3b5217154a9 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 15 Aug 2019 21:59:27 -0400 Subject: [PATCH] Convert all FugitivePrepare() int arguments to buffer names --- autoload/fugitive.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 9a89870..5777273 100644 --- 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