use hack fix for now. resolves #105.
This commit is contained in:
parent
3dc55eda4e
commit
52a4a8ea7b
|
@ -7,10 +7,25 @@ function! airline#extensions#tagbar#apply()
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:check_statusline()
|
||||||
|
" this is a hack!! unlike most plugins that set eventignore=all, tagbar only
|
||||||
|
" sets it to BufEnter, so the ordering is off: airline sets the statusline
|
||||||
|
" first, and then tagbar overwrites it, so this detects that and changes it
|
||||||
|
" back to the airline statusline.
|
||||||
|
if match(&statusline, '^%!Tagbar') >= 0
|
||||||
|
call airline#update_statusline()
|
||||||
|
endif
|
||||||
|
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","") : ""} '
|
let g:airline_section_x = '%(%{w:airline_active ? tagbar#currenttag("%s","") : ""} '
|
||||||
\ .g:airline_right_alt_sep.' %)'.g:airline_section_x
|
\ .g:airline_right_alt_sep.' %)'.g:airline_section_x
|
||||||
|
|
||||||
|
augroup airline_tagbar
|
||||||
|
autocmd!
|
||||||
|
autocmd CursorMoved * call <sid>check_statusline()
|
||||||
|
augroup END
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue