Fix command preparation bug

This commit is contained in:
Tim Pope
2021-08-22 23:12:17 -04:00
parent a41810fa86
commit bbfbfaa0a2

View File

@@ -499,11 +499,13 @@ function! s:PreparePathArgs(cmd, dir, literal, explicit) abort
endif
let split = index(a:cmd, '--')
for i in range(split < 0 ? len(a:cmd) : split)
if type(a:cmd[i]) == type(0)
if a:literal
let a:cmd[i] = fugitive#Path(bufname(a:cmd[i]), './', a:dir)
else
let a:cmd[i] = fugitive#Path(bufname(a:cmd[i]), ':(top,literal)', a:dir)
endif
endif
endfor
if split < 0
return a:cmd