mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 07:31:15 +08:00
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
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user