commit bbfbfaa0a26b548bea55ad788ba9ecbc5b4022c4 (tree)
parent a41810fa86a1ebd20e87f65d6e9bcd8f1128a419
Author: Tim Pope <code@tpope.net>
Date: Sun, 22 Aug 2021 23:12:17 -0400
Fix command preparation bug
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -499,10 +499,12 @@ 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 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)
+ 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