enable tagbar only for active windows

This commit is contained in:
Bailey Ling 2013-08-10 16:43:27 +00:00
parent e1ff1edcf0
commit 3dc55eda4e

View File

@ -2,7 +2,6 @@
" vim: ts=2 sts=2 sw=2 fdm=indent
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'
call airline#extensions#apply_left_override('Tagbar', '%{TagbarGenerateStatusline()}')
endif
@ -10,5 +9,8 @@ endfunction
function! airline#extensions#tagbar#init(ext)
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