From 0f1d7706fea9c6552a6fae138e705255d3a9f7ca Mon Sep 17 00:00:00 2001 From: micbou Date: Tue, 13 Feb 2018 11:48:39 +0100 Subject: [PATCH] Replace with in YcmCompleter command was introduced in Vim 8.0.1089. Use instead. It returns -1 when no range is given. --- autoload/youcompleteme.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 88eb204e..78ad7129 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -821,7 +821,7 @@ function! s:SetUpCommands() command! -nargs=* -complete=custom,youcompleteme#LogsComplete \ YcmToggleLogs call s:ToggleLogs() command! -nargs=* -complete=custom,youcompleteme#SubCommandsComplete -range - \ YcmCompleter call s:CompleterCommand(, + \ YcmCompleter call s:CompleterCommand(, \ , \ , \ ) @@ -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