diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 085afa0..5d4a7d7 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -76,11 +76,11 @@ function! airline#highlighter#get_highlight(group, ...) let fg = s:get_syn(a:group, 'fg') let bg = s:get_syn(a:group, 'bg') let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold') - let opts = a:000 - if bold - let opts = ['bold'] + if reverse + let res = s:get_array(bg, fg, bold ? ['bold'] : a:000) + else + let res = s:get_array(fg, bg, bold ? ['bold'] : a:000) endif - let res = reverse ? s:get_array(bg, fg, opts) : s:get_array(fg, bg, opts) endif let s:hl_groups[a:group] = res return res