Also cache filetype

The cache currently prevents e.g. that the wordcount() extensions kicks in the
first time you open a help window. Therefore take the filetype into
consideration as well.
This commit is contained in:
Christian Brabandt 2017-02-26 10:28:24 +01:00
parent 9d89375b8f
commit 2ea22c1aaa
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -41,7 +41,7 @@ function! s:on_window_changed()
endif endif
" Handle each window only once, since we might come here several times for " Handle each window only once, since we might come here several times for
" different autocommands. " different autocommands.
let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr()] let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr(), &ft]
if get(g:, 'airline_last_window_changed', []) == l:key if get(g:, 'airline_last_window_changed', []) == l:key
\ && &stl is# '%!airline#statusline('.winnr().')' \ && &stl is# '%!airline#statusline('.winnr().')'
return return