Fix missing bg setting for ANSI256 colors.

This commit is contained in:
Daniel Schmidt 2023-05-23 23:00:37 +02:00
parent 2c21fde141
commit 52a54cbfc8

9
crt.go
View File

@ -342,6 +342,15 @@ func (g *Window) handleSGR(sgr any) {
colorCache[seq.Id] = col
}
}
case SGRBgColor:
if val, ok := colorCache[seq.Id]; ok {
g.curBg = val
} else {
if col, err := colorful.Hex(termenv.ANSI256Color(seq.Id).String()); err == nil {
g.curBg = col
colorCache[seq.Id] = col
}
}
}
}