ensure changing filetypes gets updated statusline if necessary. fix statusline overwrite when using unite with -no-split

This commit is contained in:
Bailey Ling 2013-07-07 15:32:50 +00:00
parent 7ca93833ae
commit 6268cebcce
3 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,7 @@ endfunction
function! airline#update_statusline(active)
if s:is_excluded_window()
call setwinvar(winnr(), '&statusline', '')
return
endif

View File

@ -4,6 +4,7 @@ function! airline#extensions#load()
\ let w:airline_section_a = 'Unite'
\ | let w:airline_section_b = unite#get_status_string()
\ | call airline#update_statusline(1)
\ | unlet w:airline_section_a | unlet w:airline_section_b
if exists('g:loaded_ctrlp') && g:loaded_ctrlp
call airline#extensions#ctrlp#load_ctrlp_hi()

View File

@ -50,5 +50,5 @@ augroup airline
au!
autocmd ColorScheme * call airline#highlight(['normal'])
autocmd WinLeave * call airline#update_statusline(0)
autocmd WinEnter,BufWinEnter * call <sid>init() | call airline#update_statusline(1)
autocmd WinEnter,BufWinEnter,FileType * call <sid>init() | call airline#update_statusline(1)
augroup END