summaryrefslogtreecommitdiff
path: root/src/tui/tui.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-10-12 13:57:52 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-10-12 13:58:46 +0900
commit4ffde48e2f4d5e745b757ba75f650ed6da4d6623 (patch)
tree92e7eefb9aa6c5f30fb3c02f904c84e8b5488421 /src/tui/tui.go
parentf2b33f038a90fabd4b0564338b44afcbf2be04bb (diff)
downloadfzf-4ffde48e2f4d5e745b757ba75f650ed6da4d6623.tar.gz
Fix --bold inheritance
Fix #4548
Diffstat (limited to 'src/tui/tui.go')
-rw-r--r--src/tui/tui.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/tui/tui.go b/src/tui/tui.go
index ca3d5531..6596b139 100644
--- a/src/tui/tui.go
+++ b/src/tui/tui.go
@@ -1117,6 +1117,22 @@ func InitTheme(theme *ColorTheme, baseTheme *ColorTheme, boldify bool, forceBlac
theme.Bg = ColorAttr{colBlack, AttrUndefined}
}
+ if boldify {
+ boldify := func(c ColorAttr) ColorAttr {
+ dup := c
+ if (c.Attr & AttrRegular) == 0 {
+ dup.Attr |= BoldForce
+ }
+ return dup
+ }
+ theme.Current = boldify(theme.Current)
+ theme.CurrentMatch = boldify(theme.CurrentMatch)
+ theme.Prompt = boldify(theme.Prompt)
+ theme.Input = boldify(theme.Input)
+ theme.Cursor = boldify(theme.Cursor)
+ theme.Spinner = boldify(theme.Spinner)
+ }
+
o := func(a ColorAttr, b ColorAttr) ColorAttr {
c := a
if b.Color != colUndefined {
@@ -1232,22 +1248,6 @@ func InitTheme(theme *ColorTheme, baseTheme *ColorTheme, boldify bool, forceBlac
theme.FooterBorder = o(theme.Border, theme.FooterBorder)
theme.FooterLabel = o(theme.BorderLabel, theme.FooterLabel)
- if boldify {
- boldify := func(c ColorAttr) ColorAttr {
- dup := c
- if (c.Attr & AttrRegular) == 0 {
- dup.Attr |= BoldForce
- }
- return dup
- }
- theme.Current = boldify(theme.Current)
- theme.CurrentMatch = boldify(theme.CurrentMatch)
- theme.Prompt = boldify(theme.Prompt)
- theme.Input = boldify(theme.Input)
- theme.Cursor = boldify(theme.Cursor)
- theme.Spinner = boldify(theme.Spinner)
- }
-
if theme.Nomatch.IsUndefined() {
theme.Nomatch.Attr = Dim
}