Replace <range> with <count> in YcmCompleter command
<range> was introduced in Vim 8.0.1089. Use <count> instead. It returns -1 when no range is given.
This commit is contained in:
parent
5108e3fa68
commit
0f1d7706fe
@ -821,7 +821,7 @@ function! s:SetUpCommands()
|
||||
command! -nargs=* -complete=custom,youcompleteme#LogsComplete
|
||||
\ YcmToggleLogs call s:ToggleLogs(<f-args>)
|
||||
command! -nargs=* -complete=custom,youcompleteme#SubCommandsComplete -range
|
||||
\ YcmCompleter call s:CompleterCommand(<range>,
|
||||
\ YcmCompleter call s:CompleterCommand(<count>,
|
||||
\ <line1>,
|
||||
\ <line2>,
|
||||
\ <f-args>)
|
||||
@ -863,7 +863,7 @@ function! youcompleteme#LogsComplete( arglead, cmdline, cursorpos )
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:CompleterCommand( range, line1, line2, ... )
|
||||
function! s:CompleterCommand( count, line1, line2, ... )
|
||||
" CompleterCommand will call the OnUserCommand function of a completer. If
|
||||
" the first arguments is of the form "ft=..." it can be used to specify the
|
||||
" completer to use (for example "ft=cpp"). Else the native filetype completer
|
||||
@ -884,7 +884,7 @@ function! s:CompleterCommand( range, line1, line2, ... )
|
||||
exec s:python_command "ycm_state.SendCommandRequest(" .
|
||||
\ "vim.eval( 'l:arguments' )," .
|
||||
\ "vim.eval( 'l:completer' )," .
|
||||
\ "vimsupport.GetBoolValue( 'a:range' )," .
|
||||
\ "vimsupport.GetBoolValue( 'a:count != -1' )," .
|
||||
\ "vimsupport.GetIntValue( 'a:line1' )," .
|
||||
\ "vimsupport.GetIntValue( 'a:line2' ) )"
|
||||
endfunction
|
||||
|
Loading…
Reference in New Issue
Block a user