Make sure the statusline option is correct

should fix #1131 completely, but literally comparing the
statusline option with the expected value
This commit is contained in:
Christian Brabandt 2016-04-27 22:31:20 +02:00
parent d36085a5b0
commit 64a3bfd439

View File

@ -41,7 +41,7 @@ function! s:on_window_changed()
" different autocommands.
let l:key = [bufnr('%'), winnr(), winnr('$')]
if get(t:, 'airline_last_window_changed', []) == l:key
\ && &stl =~? 'airline#statusline(\d\+)$'
\ && &stl is# '%!airline#statusline('.winnr().')'
return
endif
let t:airline_last_window_changed = l:key
@ -87,7 +87,7 @@ function! s:airline_toggle()
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
autocmd GUIEnter,ColorScheme * call <sid>on_colorscheme_changed()
autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload *
autocmd SessionLoadPost,VimEnter,WinEnter,BufWinEnter,FileType,BufUnload *
\ call <sid>on_window_changed()
autocmd VimResized * call <sid>airline_refresh()