Skip to content

Commit

Permalink
Ensure alt screen switch always clears terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
knz authored and muesli committed Sep 27, 2022
1 parent 014b2a9 commit 0b2b49a
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 @@ -654,7 +654,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 0b2b49a

Please sign in to comment.