diff --git a/autoload/airline.vim b/autoload/airline.vim index faf33611..f1c8f641 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -33,6 +33,7 @@ function! airline#load_theme(name) let w:airline_lastmode = '' call airline#highlight(['inactive']) call airline#update_highlight() + call airline#extensions#load_theme() endfunction function! airline#highlight(modes) diff --git a/autoload/airline/extensions.vim b/autoload/airline/extensions.vim index b91ee0c4..f3272a95 100644 --- a/autoload/airline/extensions.vim +++ b/autoload/airline/extensions.vim @@ -69,12 +69,21 @@ function! airline#extensions#is_excluded_window() return 0 endfunction +function! airline#extensions#load_theme() + if get(g:, 'loaded_ctrlp', 0) + call airline#extensions#ctrlp#load_theme() + endif +endfunction + function! airline#extensions#load() - let g:unite_force_overwrite_statusline = 0 - let g:vimfiler_force_overwrite_statusline = 0 + if get(g:, 'loaded_unite', 0) + let g:unite_force_overwrite_statusline = 0 + endif + if get(g:, 'loaded_vimfiler', 0) + let g:vimfiler_force_overwrite_statusline = 0 + endif if get(g:, 'loaded_ctrlp', 0) - call airline#extensions#ctrlp#load_ctrlp_hi() let g:ctrlp_status_func = { \ 'main': 'airline#extensions#ctrlp#ctrlp_airline', \ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status', diff --git a/autoload/airline/extensions/ctrlp.vim b/autoload/airline/extensions/ctrlp.vim index c9105861..3348c3c7 100644 --- a/autoload/airline/extensions/ctrlp.vim +++ b/autoload/airline/extensions/ctrlp.vim @@ -1,5 +1,4 @@ -function! airline#extensions#ctrlp#load_ctrlp_hi() - let load_theme = g:airline#themes#{g:airline_theme}#normal +function! airline#extensions#ctrlp#load_theme() if exists('g:airline#themes#{g:airline_theme}#ctrlp') let theme = g:airline#themes#{g:airline_theme}#ctrlp else