enable tagbar only for active windows
This commit is contained in:
parent
e1ff1edcf0
commit
3dc55eda4e
@ -2,7 +2,6 @@
|
|||||||
" vim: ts=2 sts=2 sw=2 fdm=indent
|
" vim: ts=2 sts=2 sw=2 fdm=indent
|
||||||
|
|
||||||
function! airline#extensions#tagbar#apply()
|
function! airline#extensions#tagbar#apply()
|
||||||
let w:airline_section_x = '%(%{tagbar#currenttag("%s","")} '.g:airline_right_alt_sep.' %)'.g:airline_section_x
|
|
||||||
if &ft == 'tagbar'
|
if &ft == 'tagbar'
|
||||||
call airline#extensions#apply_left_override('Tagbar', '%{TagbarGenerateStatusline()}')
|
call airline#extensions#apply_left_override('Tagbar', '%{TagbarGenerateStatusline()}')
|
||||||
endif
|
endif
|
||||||
@ -10,5 +9,8 @@ endfunction
|
|||||||
|
|
||||||
function! airline#extensions#tagbar#init(ext)
|
function! airline#extensions#tagbar#init(ext)
|
||||||
call a:ext.add_statusline_funcref(function('airline#extensions#tagbar#apply'))
|
call a:ext.add_statusline_funcref(function('airline#extensions#tagbar#apply'))
|
||||||
|
|
||||||
|
let g:airline_section_x = '%(%{w:airline_active ? tagbar#currenttag("%s","") : ""} '
|
||||||
|
\ .g:airline_right_alt_sep.' %)'.g:airline_section_x
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user