From 232b6415d95e9770b0a427fe3ff4d7053ffb52d2 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 23 Aug 2017 15:54:06 +0200 Subject: [PATCH] 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. --- autoload/airline/extensions/tagbar.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/extensions/tagbar.vim b/autoload/airline/extensions/tagbar.vim index 7e7665a..3a351d2 100644 --- a/autoload/airline/extensions/tagbar.vim +++ b/autoload/airline/extensions/tagbar.vim @@ -29,7 +29,8 @@ let s:airline_tagbar_last_lookup_time = 0 let s:airline_tagbar_last_lookup_val = '' function! airline#extensions#tagbar#currenttag() 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_time = localtime() endif