From cdaa5117b0d7902ba8a5f5cc5b1da1dfb0f29a5d Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 1 Sep 2017 11:25:37 +0200 Subject: [PATCH] highlighter: also return bold flag --- autoload/airline/highlighter.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/airline/highlighter.vim b/autoload/airline/highlighter.vim index 9dbb82b4..579ecfe8 100644 --- a/autoload/airline/highlighter.vim +++ b/autoload/airline/highlighter.vim @@ -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