diff --git a/plugin/airline.vim b/plugin/airline.vim index 4ff26567..a6da1775 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -39,12 +39,12 @@ function! s:on_window_changed() endif " Handle each window only once, since we might come here several times for " different autocommands. - let l:key = [bufnr('%'), winnr(), winnr('$')] - if get(t:, 'airline_last_window_changed', []) == l:key + let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr()] + if get(g:, 'airline_last_window_changed', []) == l:key \ && &stl is# '%!airline#statusline('.winnr().')' return endif - let t:airline_last_window_changed = l:key + let g:airline_last_window_changed = l:key call s:init() call airline#update_statusline() endfunction