commit 69f5fcbd459c113181d18a0ea2641cd47c9e0318 (tree)
parent b540332a3e83024cc447c329e311837e568799ed
Author: Tim Pope <code@tpope.net>
Date: Sun, 10 Oct 2021 13:23:10 -0400
Allow escaped characters in tab complete
Resolves: https://github.com/tpope/vim-fugitive/issues/1859
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -2288,8 +2288,9 @@ function! s:FilterEscape(items, ...) abort
let items = copy(a:items)
call map(items, 's:fnameescape(v:val)')
if a:0 && type(a:1) == type('')
+ let match = fnameescape(a:1)
let cmp = s:FileIgnoreCase(1) ? '==?' : '==#'
- call filter(items, 'strpart(v:val, 0, strlen(a:1)) ' . cmp . ' a:1')
+ call filter(items, 'strpart(v:val, 0, strlen(match)) ' . cmp . ' match')
endif
return items
endfunction