diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 3971b8c..49aaab3 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2328,12 +2328,14 @@ call s:add_methods('buffer', ['repo', 'type']) 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 cmp = s:FileIgnoreCase(1) ? '==?' : '==#' - call filter(items, 'strpart(v:val, 0, strlen(a:1)) ' . cmp . ' a:1') + call map(items, 'fnameescape(v:val)') + if !a:0 || type(a:1) != type('') + let match = '' + else + let match = substitute(a:1, '^[+>]\|\\\@