mirror of
https://github.com/vim-airline/vim-airline.git
synced 2026-01-29 22:32:08 +08:00
airline#highlighter: s:get_syn: fallback to 'NONE'
This is required when used with 'Normal' with a transparent background. Falling back to 1 here results in "red" for "ctermbg"! I think it's important to keep the 'NONE' color property here, instead of hardcoding the fallbacks (even if white would be used instead of red).
This commit is contained in:
@@ -25,11 +25,7 @@ function! s:get_syn(group, what)
|
||||
let color = synIDattr(synIDtrans(hlID('Normal')), a:what, g:airline_gui_mode)
|
||||
endif
|
||||
if empty(color) || color == -1
|
||||
if g:airline_gui_mode ==# 'gui'
|
||||
let color = a:what ==# 'fg' ? '#000000' : '#FFFFFF'
|
||||
else
|
||||
let color = a:what ==# 'fg' ? 0 : 1
|
||||
endif
|
||||
let color = 'NONE'
|
||||
endif
|
||||
return color
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user