update the ctrlp theme when the airline theme changes

This commit is contained in:
Bailey Ling 2013-07-27 14:02:43 +00:00
parent 4683616391
commit d1ee91eadf
3 changed files with 14 additions and 5 deletions

View File

@ -33,6 +33,7 @@ function! airline#load_theme(name)
let w:airline_lastmode = '' let w:airline_lastmode = ''
call airline#highlight(['inactive']) call airline#highlight(['inactive'])
call airline#update_highlight() call airline#update_highlight()
call airline#extensions#load_theme()
endfunction endfunction
function! airline#highlight(modes) function! airline#highlight(modes)

View File

@ -69,12 +69,21 @@ function! airline#extensions#is_excluded_window()
return 0 return 0
endfunction endfunction
function! airline#extensions#load_theme()
if get(g:, 'loaded_ctrlp', 0)
call airline#extensions#ctrlp#load_theme()
endif
endfunction
function! airline#extensions#load() function! airline#extensions#load()
if get(g:, 'loaded_unite', 0)
let g:unite_force_overwrite_statusline = 0 let g:unite_force_overwrite_statusline = 0
endif
if get(g:, 'loaded_vimfiler', 0)
let g:vimfiler_force_overwrite_statusline = 0 let g:vimfiler_force_overwrite_statusline = 0
endif
if get(g:, 'loaded_ctrlp', 0) if get(g:, 'loaded_ctrlp', 0)
call airline#extensions#ctrlp#load_ctrlp_hi()
let g:ctrlp_status_func = { let g:ctrlp_status_func = {
\ 'main': 'airline#extensions#ctrlp#ctrlp_airline', \ 'main': 'airline#extensions#ctrlp#ctrlp_airline',
\ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status', \ 'prog': 'airline#extensions#ctrlp#ctrlp_airline_status',

View File

@ -1,5 +1,4 @@
function! airline#extensions#ctrlp#load_ctrlp_hi() function! airline#extensions#ctrlp#load_theme()
let load_theme = g:airline#themes#{g:airline_theme}#normal
if exists('g:airline#themes#{g:airline_theme}#ctrlp') if exists('g:airline#themes#{g:airline_theme}#ctrlp')
let theme = g:airline#themes#{g:airline_theme}#ctrlp let theme = g:airline#themes#{g:airline_theme}#ctrlp
else else