diff --git a/autoload/airline.vim b/autoload/airline.vim index f89fd202..8cc903b4 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -24,9 +24,9 @@ function! airline#exec_highlight(group, colors) \ colors[1] != '' ? 'guibg='.colors[1] : '', \ colors[2] != '' ? 'ctermfg='.colors[2] : '', \ colors[3] != '' ? 'ctermbg='.colors[3] : '', - \ colors[4] != '' ? 'gui='.colors[4] : '', - \ colors[4] != '' ? 'cterm='.colors[4] : '', - \ colors[4] != '' ? 'term='.colors[4] : '') + \ len(colors) > 4 && colors[4] != '' ? 'gui='.colors[4] : '', + \ len(colors) > 4 && colors[4] != '' ? 'cterm='.colors[4] : '', + \ len(colors) > 4 && colors[4] != '' ? 'term='.colors[4] : '') endfunction function! airline#reload_highlight() diff --git a/autoload/airline/themes/badwolf.vim b/autoload/airline/themes/badwolf.vim index 6d3dc567..51824e00 100644 --- a/autoload/airline/themes/badwolf.vim +++ b/autoload/airline/themes/badwolf.vim @@ -51,3 +51,7 @@ let g:airline#themes#badwolf#visual_modified = { let g:airline#themes#badwolf#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) let g:airline#themes#badwolf#inactive_modified = { \ 'statusline' : [ s:V1[1] , '' , s:V1[3] , '' , '' ] } + +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#badwolf#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:I2, s:I1) +endif diff --git a/autoload/airline/themes/bubblegum.vim b/autoload/airline/themes/bubblegum.vim index f6e3d0ce..f2c1759c 100644 --- a/autoload/airline/themes/bubblegum.vim +++ b/autoload/airline/themes/bubblegum.vim @@ -62,3 +62,6 @@ let g:airline#themes#bubblegum#inactive_modified = { \ 'statusline': [s:gui_orange, '', s:cterm_orange, '', ''], \ } +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#bubblegum#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:I1) +endif diff --git a/autoload/airline/themes/jellybeans.vim b/autoload/airline/themes/jellybeans.vim index 91e95ef8..3828b254 100644 --- a/autoload/airline/themes/jellybeans.vim +++ b/autoload/airline/themes/jellybeans.vim @@ -38,6 +38,10 @@ function! s:generate() " And of course, you can always do it manually as well. let s:IA = [ '#444444', '#1c1c1c', 237, 234 ] let g:airline#themes#jellybeans#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + + if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#jellybeans#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:I1) + endif endfunction call s:generate() diff --git a/autoload/airline/themes/light.vim b/autoload/airline/themes/light.vim index 91a1017a..7039a4eb 100644 --- a/autoload/airline/themes/light.vim +++ b/autoload/airline/themes/light.vim @@ -44,3 +44,7 @@ let g:airline#themes#light#inactive = airline#themes#generate_color_map(s:IA, s: let g:airline#themes#light#inactive_modified = { \ 'statusline': [ '#df0000' , '' , '160' , '', '' ] \ } + +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#light#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:I2, s:I1) +endif diff --git a/autoload/airline/themes/simple.vim b/autoload/airline/themes/simple.vim index 460665a9..99d0243f 100644 --- a/autoload/airline/themes/simple.vim +++ b/autoload/airline/themes/simple.vim @@ -100,3 +100,6 @@ let s:IA = [ '#4e4e4e' , s:guibg , 239 , s:termbg , '' ] let g:airline#themes#simple#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) let g:airline#themes#simple#inactive_modified = copy(g:airline#themes#simple#normal_modified) +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#simple#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:I1) +endif diff --git a/autoload/airline/themes/tomorrow.vim b/autoload/airline/themes/tomorrow.vim index b1886817..e727e82b 100644 --- a/autoload/airline/themes/tomorrow.vim +++ b/autoload/airline/themes/tomorrow.vim @@ -31,6 +31,10 @@ function! s:generate() let s:IA = airline#themes#get_highlight2(['NonText', 'fg'], ['CursorLine', 'bg']) let g:airline#themes#tomorrow#inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:file) + + if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#tomorrow#ctrlp = airline#extensions#ctrlp#generate_color_map(s:N3, s:N2, s:V1) + endif endfunction call s:generate()