fix regression with modified state being lost when switching windows.

This commit is contained in:
Bailey Ling 2013-07-08 22:57:22 +00:00
parent 3e1f8c8343
commit 05995a20df
1 changed files with 2 additions and 2 deletions

View File

@ -38,6 +38,7 @@ function! s:init()
if !s:airline_initialized
call airline#extensions#load()
call airline#update_externals()
call airline#highlight(['normal'])
call s:check_defined('g:airline_section_a', '%{g:airline_current_mode_text}')
call s:check_defined('g:airline_section_b', '%{g:airline_externals_fugitive}')
call s:check_defined('g:airline_section_c', g:airline_externals_bufferline)
@ -53,6 +54,5 @@ augroup airline
au!
autocmd ColorScheme * call airline#highlight(['normal'])
autocmd WinLeave * call airline#update_statusline(0)
autocmd WinEnter,BufWinEnter,FileType *
\ call <sid>init() | call airline#highlight(['normal']) | call airline#update_statusline(1)
autocmd WinEnter,BufWinEnter,FileType * call <sid>init() | call airline#update_statusline(1)
augroup END