Skip to content

Commit da8f206

Browse files
committed
Reset colors to default on suspend.
For most terminals this also is done with 'sgr0', but on some it appears that we need to explicitly use the 'oc' capability. (This is the documented behavior in terminfo.)
1 parent b7e369f commit da8f206

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRR
66
github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
77
github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY=
88
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
9-
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756 h1:9nuHUbU8dRnRRfj9KjWUVrJeoexdbeMjttk6Oh1rD10=
10-
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
119
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 h1:nxC68pudNYkKU6jWhgrqdreuFiOQWj1Fs7T3VrH4Pjw=
1210
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
1311
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=

tscreen.go

+1
Original file line numberDiff line numberDiff line change
@@ -1682,6 +1682,7 @@ func (t *tScreen) disengage() {
16821682
ti := t.ti
16831683
t.cells.Resize(0, 0)
16841684
t.TPuts(ti.ShowCursor)
1685+
t.TPuts(ti.ResetFgBg)
16851686
t.TPuts(ti.AttrOff)
16861687
t.TPuts(ti.Clear)
16871688
t.TPuts(ti.ExitCA)

0 commit comments

Comments
 (0)