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:
parent
645406f592
commit
49f3f92fd5
@ -5172,8 +5172,8 @@ function! s:GF(mode) abort
|
|||||||
endtry
|
endtry
|
||||||
if len(results) > 1
|
if len(results) > 1
|
||||||
return 'G' . a:mode .
|
return 'G' . a:mode .
|
||||||
\ ' +' . escape(join(results[1:-1], '|'), '| ') . ' ' .
|
\ ' +' . escape(results[1], ' ') . ' ' .
|
||||||
\ s:fnameescape(results[0])
|
\ s:fnameescape(results[0]) . join(map(results[2:-1], '"|" . v:val'), '')
|
||||||
elseif len(results) && len(results[0])
|
elseif len(results) && len(results[0])
|
||||||
return 'G' . a:mode . ' ' . s:fnameescape(results[0])
|
return 'G' . a:mode . ' ' . s:fnameescape(results[0])
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user