Do not accept :Gread count in argument position
Use `-range` instead of `-count` to prevent Vim from interpreting a branch name starting with a number as a count, e.g. `:Gread 123-foo` being interpreted as `:123Gread -foo`.
This commit is contained in:
parent
8f60d1d459
commit
42daa3183b
@ -1486,7 +1486,7 @@ call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gpedi
|
||||
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gsplit :execute s:Edit('split',<bang>0,<f-args>)")
|
||||
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gvsplit :execute s:Edit('vsplit',<bang>0,<f-args>)")
|
||||
call s:command("-bar -bang -nargs=* -complete=customlist,s:EditRunComplete Gtabedit :execute s:Edit('tabedit',<bang>0,<f-args>)")
|
||||
call s:command("-bar -bang -nargs=* -count -complete=customlist,s:EditRunComplete Gread :execute s:Edit((!<count> && <line1> ? '' : <count>).'read',<bang>0,<f-args>)")
|
||||
call s:command("-bar -bang -nargs=* -range=-1 -complete=customlist,s:EditRunComplete Gread :execute s:Edit((<count> == -1 ? '' : <count>).'read',<bang>0,<f-args>)")
|
||||
|
||||
" Section: Gwrite, Gwq
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user