tagbar: do not error out, if autoloaded function does not exist
tagbar is not loaded if filetype plugin is off, so do not try to call a non-existent function than.
This commit is contained in:
parent
e8b6312dd9
commit
232b6415d9
@ -29,7 +29,8 @@ let s:airline_tagbar_last_lookup_time = 0
|
|||||||
let s:airline_tagbar_last_lookup_val = ''
|
let s:airline_tagbar_last_lookup_val = ''
|
||||||
function! airline#extensions#tagbar#currenttag()
|
function! airline#extensions#tagbar#currenttag()
|
||||||
if get(w:, 'airline_active', 0)
|
if get(w:, 'airline_active', 0)
|
||||||
if s:airline_tagbar_last_lookup_time != localtime()
|
" function tagbar#currenttag does not exist, if filetype is not enabled
|
||||||
|
if s:airline_tagbar_last_lookup_time != localtime() && exists("*tagbar#currenttag")
|
||||||
let s:airline_tagbar_last_lookup_val = tagbar#currenttag('%s', '', s:flags)
|
let s:airline_tagbar_last_lookup_val = tagbar#currenttag('%s', '', s:flags)
|
||||||
let s:airline_tagbar_last_lookup_time = localtime()
|
let s:airline_tagbar_last_lookup_time = localtime()
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user