cterm=reverse not honored; only term=reverse was

This patch makes Airline honor the `cterm=reverse` syntax attribute.
This commit is contained in:
Suraj N. Kurapati 2014-06-29 06:27:53 -07:00
parent 3ab1bb7eb0
commit bd7220cb5b

View File

@ -42,7 +42,10 @@ endfunction
function! airline#highlighter#get_highlight(group, ...)
let fg = s:get_syn(a:group, 'fg')
let bg = s:get_syn(a:group, 'bg')
let reverse = synIDattr(synIDtrans(hlID(a:group)), 'reverse', has('gui_running') ? 'gui' : 'term')
let reverse = has('gui_running')
\ ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui')
\ : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm')
\|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term')
return reverse ? s:get_array(bg, fg, a:000) : s:get_array(fg, bg, a:000)
endfunction