diff --git a/autoload/airline/extensions/tagbar.vim b/autoload/airline/extensions/tagbar.vim index dc92a62f..9df6a63f 100644 --- a/autoload/airline/extensions/tagbar.vim +++ b/autoload/airline/extensions/tagbar.vim @@ -8,7 +8,6 @@ if !exists(':TagbarToggle') finish endif -let s:flags = get(g:, 'airline#extensions#tagbar#flags', '') let s:spc = g:airline_symbols.space let s:init=0 @@ -41,9 +40,10 @@ function! airline#extensions#tagbar#currenttag() unlet! a let s:init=1 endif + let flags = get(g:, 'airline#extensions#tagbar#flags', '') " 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, get(g:, 'airline#extensions#tagbar#searchmethod', 'nearest-stl')) + let s:airline_tagbar_last_lookup_val = tagbar#currenttag('%s', '', flags, get(g:, 'airline#extensions#tagbar#searchmethod', 'nearest-stl')) let s:airline_tagbar_last_lookup_time = localtime() endif return s:airline_tagbar_last_lookup_val