mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-25 23:14:50 +02:00
extensions: prevent error about unknown function for ycm
if g:loaded_youcompleteme does not exists, the ycm extension will not be loaded. However extensions.vim could still try to init the ycm extension, which would lead to an error message: E117: unknown function airline#extensions#ycm#init so make sure, it is only loaded, if ycm is loaded as well.
This commit is contained in:
parent
2eb95b2e09
commit
76c1998753
@ -176,7 +176,7 @@ function! airline#extensions#load()
|
||||
call add(s:loaded_ext, 'term')
|
||||
endif
|
||||
|
||||
if get(g:, 'airline#extensions#ycm#enabled', 0)
|
||||
if get(g:, 'airline#extensions#ycm#enabled', 0) && exists('g:loaded_youcompleteme')
|
||||
call airline#extensions#ycm#init(s:ext)
|
||||
call add(s:loaded_ext, 'ycm')
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user