summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/gdamore/tcell/v2/tscreen.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-03-03 18:46:50 +0100
committerGitHub <noreply@github.com>2024-03-03 18:46:50 +0100
commit8d9e5d1258a998e60b46686e33fe36f76ce01733 (patch)
tree6d1290b2732e6b543d91d8970736492043d2a84e /vendor/github.com/gdamore/tcell/v2/tscreen.go
parent0f14065245f240f71c3ad067159c3116f4ad5915 (diff)
parent212ec7e8e56161597dd72581a27ef954b721f7fa (diff)
Bump gocui (#3356)
This resolves the regression from the last gocui bump that strikethrough no longer worked. Fixes #3355.
Diffstat (limited to 'vendor/github.com/gdamore/tcell/v2/tscreen.go')
-rw-r--r--vendor/github.com/gdamore/tcell/v2/tscreen.go15
1 files changed, 12 insertions, 3 deletions
diff --git a/vendor/github.com/gdamore/tcell/v2/tscreen.go b/vendor/github.com/gdamore/tcell/v2/tscreen.go
index 7ccbbebb8..498f744fd 100644
--- a/vendor/github.com/gdamore/tcell/v2/tscreen.go
+++ b/vendor/github.com/gdamore/tcell/v2/tscreen.go
@@ -1822,7 +1822,14 @@ func (t *tScreen) engage() error {
}
ti := t.ti
- t.TPuts(ti.EnterCA)
+ if os.Getenv("TCELL_ALTSCREEN") != "disable" {
+ // Technically this may not be right, but every terminal we know about
+ // (even Wyse 60) uses this to enter the alternate screen buffer, and
+ // possibly save and restore the window title and/or icon.
+ // (In theory there could be terminals that don't support X,Y cursor
+ // positions without a setup command, but we don't support them.)
+ t.TPuts(ti.EnterCA)
+ }
t.TPuts(ti.EnterKeypad)
t.TPuts(ti.HideCursor)
t.TPuts(ti.EnableAcs)
@@ -1865,10 +1872,12 @@ func (t *tScreen) disengage() {
}
t.TPuts(ti.ResetFgBg)
t.TPuts(ti.AttrOff)
- t.TPuts(ti.Clear)
- t.TPuts(ti.ExitCA)
t.TPuts(ti.ExitKeypad)
t.TPuts(ti.EnableAutoMargin)
+ if os.Getenv("TCELL_ALTSCREEN") != "disable" {
+ t.TPuts(ti.Clear) // only needed if ExitCA is empty
+ t.TPuts(ti.ExitCA)
+ }
t.enableMouse(0)
t.enablePasting(false)
t.disableFocusReporting()