ensure changing filetypes gets updated statusline if necessary. fix statusline overwrite when using unite with -no-split
This commit is contained in:
parent
7ca93833ae
commit
6268cebcce
|
@ -78,6 +78,7 @@ endfunction
|
|||
|
||||
function! airline#update_statusline(active)
|
||||
if s:is_excluded_window()
|
||||
call setwinvar(winnr(), '&statusline', '')
|
||||
return
|
||||
endif
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue