Skip to content
Myr

Fix --bold inheritance

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #4548

authored by Junegunn Choi · committed by Junegunn Choi · parent f2b33f0 · Browse files · 1 file+16 added−16 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−16 removed

  • other:+16 added−16 removed

1 file+16 added−16 removed

modified:src/tui/tui.go+16 added-16 removed
1115 unmodified lines
1116 if forceBlack {1117 theme.Bg = ColorAttr{colBlack, AttrUndefined}1118 }11191120 if boldify {1121 boldify := func(c ColorAttr) ColorAttr {1122 dup := c1123 if (c.Attr & AttrRegular) == 0 {1124 dup.Attr |= BoldForce1125 }1126 return dup1127 }1128 theme.Current = boldify(theme.Current)1129 theme.CurrentMatch = boldify(theme.CurrentMatch)1130 theme.Prompt = boldify(theme.Prompt)1131 theme.Input = boldify(theme.Input)1132 theme.Cursor = boldify(theme.Cursor)1133 theme.Spinner = boldify(theme.Spinner)1134 }11351136 o := func(a ColorAttr, b ColorAttr) ColorAttr {1137 c := a1138 if b.Color != colUndefined {1139 c.Color = b.Color
107 unmodified lines
1247 theme.FooterBg = o(theme.Bg, theme.FooterBg)1248 theme.FooterBorder = o(theme.Border, theme.FooterBorder)1249 theme.FooterLabel = o(theme.BorderLabel, theme.FooterLabel)12501235 if boldify {1236 boldify := func(c ColorAttr) ColorAttr {1237 dup := c1238 if (c.Attr & AttrRegular) == 0 {1239 dup.Attr |= BoldForce1240 }1241 return dup1242 }1243 theme.Current = boldify(theme.Current)1244 theme.CurrentMatch = boldify(theme.CurrentMatch)1245 theme.Prompt = boldify(theme.Prompt)1246 theme.Input = boldify(theme.Input)1247 theme.Cursor = boldify(theme.Cursor)1248 theme.Spinner = boldify(theme.Spinner)1249 }12501251 if theme.Nomatch.IsUndefined() {1252 theme.Nomatch.Attr = Dim1253 }1254
62 unmodified lines