mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-02-20 00:28:26 +08:00
Fix matching of themes to color names
theme usually use '_' instead of '-', so replace that first before trying to match. Second, make the patterns easier to match. Third, make sure, match for Tomorrow happens with matching case fixes #1056
This commit is contained in:
@@ -71,7 +71,7 @@ endfunction
|
||||
|
||||
function! airline#switch_matching_theme()
|
||||
if exists('g:colors_name')
|
||||
let existing = g:airline_theme
|
||||
let existing = substitute(g:airline_theme, '-', '_', 'g')
|
||||
try
|
||||
let palette = g:airline#themes#{g:colors_name}#palette
|
||||
call airline#switch_theme(g:colors_name)
|
||||
|
||||
Reference in New Issue
Block a user