From 703241942a40d0eeb462bb7406abf2416b5e89e4 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Mon, 20 Mar 2017 08:36:54 +0100 Subject: [PATCH] Add filetype to chache, disable cache for fugitive #1452 (partly) --- plugin/airline.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 1d5ddcd..573c531 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -41,9 +41,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('$'), tabpagenr()] + let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr(), &ft] if get(g:, 'airline_last_window_changed', []) == l:key \ && &stl is# '%!airline#statusline('.winnr().')' + \ && ft !~? 'gitcommit' + " fugitive is special, it changes names and filetypes several times, + " make sure the caching does not get into its way return endif let g:airline_last_window_changed = l:key