From 91904d942e52a17d0c21ba7928fed66a19d9ef02 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Thu, 15 Aug 2013 15:02:54 -0400 Subject: [PATCH] check initialized so autoloaded plugins happen first --- autoload/airline/extensions.vim | 2 +- plugin/airline.vim | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/autoload/airline/extensions.vim b/autoload/airline/extensions.vim index fd39aa0..770597e 100644 --- a/autoload/airline/extensions.vim +++ b/autoload/airline/extensions.vim @@ -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 diff --git a/plugin/airline.vim b/plugin/airline.vim index c8153be..89c388a 100644 --- a/plugin/airline.vim +++ b/plugin/airline.vim @@ -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 on_window_changed() + autocmd! + autocmd ColorScheme * call airline#reload_highlight() + autocmd WinEnter,BufWinEnter,FileType,BufUnload,ShellCmdPost * + \ call on_window_changed() augroup END - " update statusline now - call on_window_changed() + if s:airline_initialized + call on_window_changed() + endif endif endfunction