Fix airline#switch_matching_theme() to accommodate camelcased colorscheme names

This commit is contained in:
Ryan Lue 2017-08-07 12:42:22 +08:00
parent a2e20bc3ca
commit 039fd6b50f

View File

@ -76,7 +76,7 @@ endfunction
function! airline#switch_matching_theme() function! airline#switch_matching_theme()
if exists('g:colors_name') if exists('g:colors_name')
let existing = g:airline_theme let existing = g:airline_theme
let theme = substitute(g:colors_name, '-', '_', 'g') let theme = substitute(tolower(g:colors_name), '-', '_', 'g')
try try
let palette = g:airline#themes#{theme}#palette let palette = g:airline#themes#{theme}#palette
call airline#switch_theme(theme) call airline#switch_theme(theme)