commit a50e0725879bb64fb3b10cda71ada043d28afe0b (tree)
parent 2fdba349f5039f0492b25f7cabe0af44bcd02447
Author: Tim Pope <code@tpope.net>
Date: Sat, 6 Jul 2019 13:47:30 -0400
Fix handling of bar in argument parsing
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -973,7 +973,7 @@ function! s:ExpandSplit(string, ...) abort
if handle_bar && string =~# '^\s*|'
return [list, substitute(string, '^\s*', '', '')]
endif
- let arg = matchstr(string, '^\s*\%(' . dquote . '''[^'']*''\|\\.\|\S\)\+')
+ let arg = matchstr(string, '^\s*\%(' . dquote . '''[^'']*''\|\\.\|[^[:space:] ' . (handle_bar ? '|' : '') . ']\)\+')
let string = strpart(string, len(arg))
let arg = substitute(substitute(arg, '^\s\+', '', ''),
\ '\(' . dquote . '''\%(''''\|[^'']\)*''\|\\[' . s:fnameescape . ']\|^\\[>+-]\|!\d*\)\|' . s:expand,