check initialized so autoloaded plugins happen first

This commit is contained in:
Bailey Ling 2013-08-15 15:02:54 -04:00
parent f5afe4bcac
commit 91904d942e
2 changed files with 8 additions and 7 deletions

View File

@ -129,7 +129,7 @@ function! airline#extensions#load()
call airline#extensions#tagbar#init(s:ext)
endif
if g:airline_enable_csv && exists(':Table')
if g:airline_enable_csv && (get(g:, 'loaded_csv', 0) || exists(':Table'))
call airline#extensions#csv#init(s:ext)
endif

View File

@ -83,13 +83,14 @@ function! s:airline_toggle()
else
let s:stl = &stl
augroup airline
autocmd!
autocmd ColorScheme * call airline#reload_highlight()
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost *
\ call <sid>on_window_changed()
autocmd!
autocmd ColorScheme * call airline#reload_highlight()
autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost *
\ call <sid>on_window_changed()
augroup END
" update statusline now
call <sid>on_window_changed()
if s:airline_initialized
call <sid>on_window_changed()
endif
endif
endfunction