From 64a3bfd4399223bec32d0c91ab9a14be1ffe081b Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Wed, 27 Apr 2016 22:31:20 +0200 Subject: [PATCH] Make sure the statusline option is correct should fix #1131 completely, but literally comparing the statusline option with the expected value --- plugin/airline.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/airline.vim b/plugin/airline.vim index 2fcbd450..1c13380d 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -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 on_colorscheme_changed() - autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload * + autocmd SessionLoadPost,VimEnter,WinEnter,BufWinEnter,FileType,BufUnload * \ call on_window_changed() autocmd VimResized * call airline_refresh()