highlighter: also return bold flag

This commit is contained in:
Christian Brabandt 2017-09-01 11:25:37 +02:00
parent e7a5c97df1
commit cdaa5117b0
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
1 changed files with 6 additions and 1 deletions

View File

@ -62,7 +62,12 @@ function! airline#highlighter#get_highlight(group, ...)
\ ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui')
\ : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm')
\|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term')
let res = reverse ? s:get_array(bg, fg, a:000) : s:get_array(fg, bg, a:000)
let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold')
let opts = a:000
if bold
let opts = ['bold']
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