From 6925d567eb84457681fe268263f20ed6e4da9d18 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Wed, 28 Aug 2013 23:05:28 -0400 Subject: [PATCH] handle reversed highlight groups. --- autoload/airline/themes.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/airline/themes.vim b/autoload/airline/themes.vim index d4b987d..d4ec32b 100644 --- a/autoload/airline/themes.vim +++ b/autoload/airline/themes.vim @@ -43,7 +43,8 @@ endfunction function! airline#themes#get_highlight(group, ...) let fg = s:get_syn(a:group, 'fg') let bg = s:get_syn(a:group, 'bg') - return s:get_array(fg, bg, a:000) + let reverse = synIDattr(synIDtrans(hlID(a:group)), 'reverse', has('gui_running') ? 'gui' : 'term') + return reverse ? s:get_array(bg, fg, a:000) : s:get_array(fg, bg, a:000) endfunction function! airline#themes#get_highlight2(fg, bg, ...)