themes: Do not try to load the palette twice
This will be done explicitly by the switch_theme() function
This commit is contained in:
parent
d441b3f7b6
commit
464633baad
@ -86,14 +86,12 @@ function! airline#switch_matching_theme()
|
|||||||
let existing = g:airline_theme
|
let existing = g:airline_theme
|
||||||
let theme = substitute(tolower(g:colors_name), '-', '_', 'g')
|
let theme = substitute(tolower(g:colors_name), '-', '_', 'g')
|
||||||
try
|
try
|
||||||
let palette = g:airline#themes#{theme}#palette
|
|
||||||
call airline#switch_theme(theme)
|
call airline#switch_theme(theme)
|
||||||
return 1
|
return 1
|
||||||
catch
|
catch
|
||||||
for map in items(g:airline_theme_map)
|
for map in items(g:airline_theme_map)
|
||||||
if match(g:colors_name, map[0]) > -1
|
if match(g:colors_name, map[0]) > -1
|
||||||
try
|
try
|
||||||
let palette = g:airline#themes#{map[1]}#palette
|
|
||||||
call airline#switch_theme(map[1])
|
call airline#switch_theme(map[1])
|
||||||
catch
|
catch
|
||||||
call airline#switch_theme(existing)
|
call airline#switch_theme(existing)
|
||||||
|
Loading…
Reference in New Issue
Block a user