mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user