handle reversed highlight groups.

This commit is contained in:
Bailey Ling 2013-08-28 23:05:28 -04:00
parent 8beb275534
commit 6925d567eb
1 changed files with 2 additions and 1 deletions

View File

@ -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, ...)