commit 370a47d
Hubert Hirtz
·
2020-08-05 20:40:59 +0000 UTC
parent f7843c5
Fix colors not being reset with \x03
1 files changed,
+4,
-0
+4,
-0
1@@ -104,9 +104,13 @@ func (cb *colorBuffer) Reset() {
2 func (cb *colorBuffer) Style(st tcell.Style) tcell.Style {
3 if 0 <= cb.fg {
4 st = st.Foreground(colorFromCode(cb.fg))
5+ } else {
6+ st = st.Foreground(tcell.ColorDefault)
7 }
8 if 0 <= cb.bg {
9 st = st.Background(colorFromCode(cb.bg))
10+ } else {
11+ st = st.Background(tcell.ColorDefault)
12 }
13 return st
14 }