Respect 'regular' attribute in 'bw' base theme

Don't make the text bold if an element is explicitly specified as
'regular'.

Fix #3222
This commit is contained in:
Junegunn Choi committed 2023-03-26 23:39:05 +09:00
1 parent d7daf5f724
commit 60f37aae2f
3 files changed
+20 -28

No files matched your search

+1 -3
View File
@@ -2003,9 +2003,7 @@ func postProcessOptions(opts *Options) {
theme := opts.Theme
boldify := func(c tui.ColorAttr) tui.ColorAttr {
dup := c
if !theme.Colored {
dup.Attr |= tui.Bold
} else if (c.Attr & tui.AttrRegular) == 0 {
if (c.Attr & tui.AttrRegular) == 0 {
dup.Attr |= tui.Bold
}
return dup