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
2023-03-26 23:39:05 +09:00
parent d7daf5f724
commit 60f37aae2f
3 changed files with 20 additions and 28 deletions

View File

@@ -201,7 +201,6 @@ type Terminal struct {
tabstop int
margin [4]sizeSpec
padding [4]sizeSpec
strong tui.Attr
unicode bool
listenPort *int
borderShape tui.BorderShape
@@ -541,10 +540,6 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal {
if len(opts.Preview.command) > 0 || hasPreviewAction(opts) || opts.ListenPort != nil {
previewBox = util.NewEventBox()
}
strongAttr := tui.Bold
if !opts.Bold {
strongAttr = tui.AttrRegular
}
var renderer tui.Renderer
fullscreen := !opts.Height.auto && (opts.Height.size == 0 || opts.Height.percent && opts.Height.size == 100)
if fullscreen {
@@ -623,7 +618,6 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal {
previewLabelOpts: opts.PreviewLabel,
cleanExit: opts.ClearOnExit,
paused: opts.Phony,
strong: strongAttr,
cycle: opts.Cycle,
headerFirst: opts.HeaderFirst,
headerLines: opts.HeaderLines,