Merge pull request #1201 from chrisbra/ycm
call YCM function only if they are defined
This commit is contained in:
commit
fadd737a29
@ -11,7 +11,7 @@ function! airline#extensions#ycm#init(ext)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#ycm#get_error_count()
|
function! airline#extensions#ycm#get_error_count()
|
||||||
if exists(':YcmDiag')
|
if exists(':YcmDiag') && exists("*youcompleteme#GetErrorCount")
|
||||||
let cnt = youcompleteme#GetErrorCount()
|
let cnt = youcompleteme#GetErrorCount()
|
||||||
|
|
||||||
if cnt != 0
|
if cnt != 0
|
||||||
@ -23,7 +23,7 @@ function! airline#extensions#ycm#get_error_count()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#extensions#ycm#get_warning_count()
|
function! airline#extensions#ycm#get_warning_count()
|
||||||
if exists(':YcmDiag')
|
if exists(':YcmDiag') && exists("*youcompleteme#GetWarningCount")
|
||||||
let cnt = youcompleteme#GetWarningCount()
|
let cnt = youcompleteme#GetWarningCount()
|
||||||
|
|
||||||
if cnt != 0
|
if cnt != 0
|
||||||
|
Loading…
Reference in New Issue
Block a user