Do not trigger on SessionLoadPost autocommand

This basically reverts commit 64a3bfd

closes #1444
This commit is contained in:
Christian Brabandt 2017-03-16 13:13:16 +01:00
parent 46b0b6bf5a
commit 70dd0655d2
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -43,7 +43,6 @@ function! s:on_window_changed()
" different autocommands.
let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr()]
if get(g:, 'airline_last_window_changed', []) == l:key
\ && &stl is# '%!airline#statusline('.winnr().')'
return
endif
let g:airline_last_window_changed = l:key
@ -90,7 +89,7 @@ function! s:airline_toggle()
autocmd CmdwinLeave * call airline#remove_statusline_func('airline#cmdwinenter')
autocmd GUIEnter,ColorScheme * call <sid>on_colorscheme_changed()
autocmd SessionLoadPost,VimEnter,WinEnter,BufWinEnter,FileType,BufUnload *
autocmd VimEnter,WinEnter,BufWinEnter,FileType,BufUnload *
\ call <sid>on_window_changed()
if exists('#CompleteDone')
autocmd CompleteDone * call <sid>on_window_changed()