From fb6231b4790869dca5287326fddee2c8a2b35291 Mon Sep 17 00:00:00 2001 From: Chris White Date: Sun, 12 Mar 2017 18:16:26 -0400 Subject: [PATCH] Permit appending content to a theme When ctrlp is not loaded, do not finish (terminate script execution). Instead, just skip assigning the ctrlp colors. --- autoload/airline/themes/dark.vim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/autoload/airline/themes/dark.vim b/autoload/airline/themes/dark.vim index 44f4a1af..c242d7b1 100644 --- a/autoload/airline/themes/dark.vim +++ b/autoload/airline/themes/dark.vim @@ -94,11 +94,10 @@ let g:airline#themes#dark#palette.accents = { " variable so that related functionality is loaded iff the user is using " ctrlp. Note that this is optional, and if you do not define ctrlp colors " they will be chosen automatically from the existing palette. -if !get(g:, 'loaded_ctrlp', 0) - finish +if get(g:, 'loaded_ctrlp', 0) + let g:airline#themes#dark#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( + \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], + \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], + \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ]) endif -let g:airline#themes#dark#palette.ctrlp = airline#extensions#ctrlp#generate_color_map( - \ [ '#d7d7ff' , '#5f00af' , 189 , 55 , '' ], - \ [ '#ffffff' , '#875fd7' , 231 , 98 , '' ], - \ [ '#5f00af' , '#ffffff' , 55 , 231 , 'bold' ])