From 134c0204f3b947276c0e6f26f4fe426b5cba5c06 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Sun, 5 Mar 2017 22:18:04 +0100 Subject: [PATCH] Do not return a negative background color fixes #1429 and similar --- autoload/airline/highlighter.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 7178e6b4..af8e83dc 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -108,6 +108,10 @@ function! s:CheckDefined(colors) " but at least this makes sure, the group will be defined let fg = g:airline#highlighter#normal_fg_hi let bg = synIDattr(synIDtrans(hlID('Normal')), 'bg', 'cterm') + if bg < 0 + " in case there is no background color defined for Normal + let bg = a:colors[3] + endif return a:colors[0:1] + [fg, bg] + [a:colors[4]] endfunction