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:
parent
1e38a2bfc5
commit
5cd560c021
@ -706,10 +706,13 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:InvokeSemanticCompletion()
|
function! s:InvokeSemanticCompletion()
|
||||||
|
if &completefunc == "youcompleteme#CompleteFunc"
|
||||||
let s:force_semantic = 1
|
let s:force_semantic = 1
|
||||||
exec s:python_command "ycm_state.SendCompletionRequest( True )"
|
exec s:python_command "ycm_state.SendCompletionRequest( True )"
|
||||||
|
|
||||||
call s:PollCompletion()
|
call s:PollCompletion()
|
||||||
|
endif
|
||||||
|
|
||||||
" Since this function is called in a mapping through the expression register
|
" 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
|
" <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.
|
" insert anything so we return an empty string.
|
||||||
|
Loading…
Reference in New Issue
Block a user