Skip to content

Commit

Permalink
fix: adapt to recent API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Sep 27, 2022
1 parent def4358 commit 2f06c06
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tea.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,11 @@ func (p *Program) EnterAltScreen() {
p.output.MoveCursor(1, 1)

// The reasoning behind this hideCursor is behavior of AltScreen in cmd.exe
// cmd stores two different cursor "states" for both AltScreen and main buffer
// so, we have to explicitly call hideCursor whenever we enter AltScreen
// Note: This should also fix cursor bugs on other platforms
hideCursor(p.output)
// cmd stores two different cursor "states" for both AltScreen and main
// buffer so, we have to explicitly call hideCursor whenever we enter
// AltScreen.
// Note: This should also fix cursor bugs on other platforms.
p.output.HideCursor()

p.altScreenActive = true
if p.renderer != nil {
Expand All @@ -662,8 +663,8 @@ func (p *Program) ExitAltScreen() {

p.output.ExitAltScreen()

// We have to make sure each time we exit AltScreen, we restore the cursor
showCursor(p.output)
// We have to make sure each time we exit AltScreen, we restore the cursor.
p.output.ShowCursor()

p.altScreenActive = false
if p.renderer != nil {
Expand Down

0 comments on commit 2f06c06

Please sign in to comment.