Skip to content

Commit

Permalink
fix: ensure alt screen switch always clears terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
knz committed Oct 2, 2022
1 parent 6fe6643 commit cabe8cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tea.go
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,11 @@ func (p *Program) EnterAltScreen() {
}

p.output.AltScreen()
p.output.MoveCursor(1, 1)

// Ensure that the terminal is cleared, even when it doesn't support
// alt screen (or alt screen support is disabled, like GNU screen by
// default).
p.clearScreen()

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

0 comments on commit cabe8cf

Please sign in to comment.