aboutsummaryrefslogtreecommitdiffstats
path: root/config/style.go
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2023-03-11 18:28:45 +0100
committerRobin Jarry <robin@jarry.cc>2023-03-31 21:02:18 +0200
commit30823efe57b832fccfccdb607d4ce52348b8e189 (patch)
treed3167772e08bb8c22ce3fe04f3cfc5484d8da408 /config/style.go
parentae4d742c5a90091c1229639a8480830805ac105d (diff)
downloadaerc-30823efe57b832fccfccdb607d4ce52348b8e189.tar.gz
style: inherit colors unless explicitly set in layered styles
Inherit from the lower layers colors unless explicitly overridden in upper layers. Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Bence Ferdinandy <bence@ferdinandy.com>
Diffstat (limited to 'config/style.go')
-rw-r--r--config/style.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/style.go b/config/style.go
index 7b13c3a2..2703b257 100644
--- a/config/style.go
+++ b/config/style.go
@@ -223,10 +223,10 @@ func (s *Style) Set(attr, val string) error {
func (s Style) composeWith(styles []*Style) Style {
newStyle := s
for _, st := range styles {
- if st.Fg != s.Fg {
+ if st.Fg != s.Fg && st.Fg != tcell.ColorDefault {
newStyle.Fg = st.Fg
}
- if st.Bg != s.Bg {
+ if st.Bg != s.Bg && st.Bg != tcell.ColorDefault {
newStyle.Bg = st.Bg
}
if st.Bold != s.Bold {