mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-06 21:54:42 +02:00
tagbar: move s:flags to inside the function
This matters, if the users later changes the 'airline#extensions#tagbar#flags' variable, so that it will be taken into account by the tagbar extension
This commit is contained in:
parent
50a936608c
commit
08cfcf9408
@ -8,7 +8,6 @@ if !exists(':TagbarToggle')
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let s:flags = get(g:, 'airline#extensions#tagbar#flags', '')
|
|
||||||
let s:spc = g:airline_symbols.space
|
let s:spc = g:airline_symbols.space
|
||||||
let s:init=0
|
let s:init=0
|
||||||
|
|
||||||
@ -41,9 +40,10 @@ function! airline#extensions#tagbar#currenttag()
|
|||||||
unlet! a
|
unlet! a
|
||||||
let s:init=1
|
let s:init=1
|
||||||
endif
|
endif
|
||||||
|
let flags = get(g:, 'airline#extensions#tagbar#flags', '')
|
||||||
" function tagbar#currenttag does not exist, if filetype is not enabled
|
" function tagbar#currenttag does not exist, if filetype is not enabled
|
||||||
if s:airline_tagbar_last_lookup_time != localtime() && exists("*tagbar#currenttag")
|
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()
|
let s:airline_tagbar_last_lookup_time = localtime()
|
||||||
endif
|
endif
|
||||||
return s:airline_tagbar_last_lookup_val
|
return s:airline_tagbar_last_lookup_val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user