mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-26 18:31:02 +08:00
Tabline protect against missing palletes
If normal_modified or normal_modified.airline_c aren't present, fallback to the default normal.airline_c.
This commit is contained in:
parent
bfd160a08b
commit
a5e5d8ab4f
|
@ -71,7 +71,13 @@ function! airline#extensions#tabline#load_theme(palette)
|
|||
let l:tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a)
|
||||
let l:tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c)
|
||||
let l:tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a)
|
||||
if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c')
|
||||
let l:tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal_modified.airline_c)
|
||||
else
|
||||
"Fall back to normal airline_c if modified airline_c isn't present
|
||||
let l:tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal.airline_c)
|
||||
endif
|
||||
|
||||
let l:tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c)
|
||||
call airline#highlighter#exec('airline_tab', l:tab)
|
||||
call airline#highlighter#exec('airline_tabsel', l:tabsel)
|
||||
|
|
Loading…
Reference in New Issue
Block a user