Check completefunc when forcing semantic completion

Vim returns an error when forcing semantic completion and the completefunc is
not set.
This commit is contained in:
micbou 2017-07-20 13:38:13 +02:00
parent 1e38a2bfc5
commit 5cd560c021
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05

View File

@ -706,10 +706,13 @@ endfunction
function! s:InvokeSemanticCompletion()
if &completefunc == "youcompleteme#CompleteFunc"
let s:force_semantic = 1
exec s:python_command "ycm_state.SendCompletionRequest( True )"
call s:PollCompletion()
endif
" Since this function is called in a mapping through the expression register
" <C-R>=, its return value is inserted (see :h c_CTRL-R_=). We don't want to
" insert anything so we return an empty string.