Guard against inadvertent :| invocation

I haven't been able to consistently reproduce it, but sometimes vim
takes :edit +CmdA\|CmdB to mean :CmdA followed by :| and not :CmdA
followed by :CmdB.
This commit is contained in:
Tim Pope 2019-07-28 19:13:29 -04:00
parent 645406f592
commit 49f3f92fd5

View File

@ -5172,8 +5172,8 @@ function! s:GF(mode) abort
endtry
if len(results) > 1
return 'G' . a:mode .
\ ' +' . escape(join(results[1:-1], '|'), '| ') . ' ' .
\ s:fnameescape(results[0])
\ ' +' . escape(results[1], ' ') . ' ' .
\ s:fnameescape(results[0]) . join(map(results[2:-1], '"|" . v:val'), '')
elseif len(results) && len(results[0])
return 'G' . a:mode . ' ' . s:fnameescape(results[0])
else