diff --git a/autoload/airline/extensions/tagbar.vim b/autoload/airline/extensions/tagbar.vim index f1ad0e7e..bf7efee9 100644 --- a/autoload/airline/extensions/tagbar.vim +++ b/autoload/airline/extensions/tagbar.vim @@ -20,7 +20,7 @@ function! airline#extensions#tagbar#init(ext) call a:ext.add_inactive_statusline_func('airline#extensions#tagbar#inactive_apply') let g:tagbar_status_func = 'airline#extensions#tagbar#get_status' - let g:airline_section_x = '%(%{get(w:,"airline_active",0) ? tagbar#currenttag("%s","") : ""} ' - \ .g:airline_right_alt_sep.' %)'.g:airline_section_x + let g:airline_parts.tagbar = '%(%{get(w:,"airline_active",0) ? tagbar#currenttag("%s","") : ""} ' + \ .g:airline_right_alt_sep.' %)' endfunction diff --git a/plugin/airline.vim b/plugin/airline.vim index 20c69a2d..305fe380 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -47,6 +47,7 @@ call extend(g:airline_parts, { \ 'file': '%f%m', \ 'hunks': '', \ 'branch': '', + \ 'tagbar': '', \ }, 'keep') call s:check_defined('g:airline_mode_map', {}) @@ -83,7 +84,7 @@ function! s:init() call s:check_defined('g:airline_section_b', (g:airline_parts.hunks).(g:airline_parts.branch)) call s:check_defined('g:airline_section_c', (g:airline_parts.file)) call s:check_defined('g:airline_section_gutter', ' '.(g:airline_parts.readonly).'%=') - call s:check_defined('g:airline_section_x', '%{&filetype}') + call s:check_defined('g:airline_section_x', (g:airline_parts.tagbar).'%{&filetype}') call s:check_defined('g:airline_section_y', g:airline_parts.ffenc) call s:check_defined('g:airline_section_z', '%3p%% %{g:airline_symbols.linenr} %3l:%3c') call s:check_defined('g:airline_section_warning', '__')