From 4540ea428aedb25ce82b8faca11d8d300db5ca91 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Sat, 27 Feb 2016 11:22:30 -0800 Subject: [PATCH] Fix colorscheme to theme matching Fixes #1067 for real. --- autoload/airline.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autoload/airline.vim b/autoload/airline.vim index 026722a7..f19d2fbe 100644 --- a/autoload/airline.vim +++ b/autoload/airline.vim @@ -71,10 +71,11 @@ endfunction function! airline#switch_matching_theme() if exists('g:colors_name') - let existing = substitute(g:colors_name, '-', '_', 'g') + let existing = g:airline_theme + let theme = substitute(g:colors_name, '-', '_', 'g') try - let palette = g:airline#themes#{g:colors_name}#palette - call airline#switch_theme(g:colors_name) + let palette = g:airline#themes#{theme}#palette + call airline#switch_theme(theme) return 1 catch for map in items(g:airline_theme_map)