Skip to content

Commit

Permalink
fix(exec): give the terminal a moment to catch up if exiting altscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
meowgorithm committed Apr 6, 2022
1 parent 54a84a3 commit 7d6e0c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tea.go
Expand Up @@ -717,7 +717,10 @@ func (p *Program) ReleaseTerminal() error {
p.ignoreSignals = true
p.cancelInput()
p.altScreenWasActive = p.altScreenActive
p.ExitAltScreen() // no-op if not active
if p.altScreenActive {
p.ExitAltScreen()
time.Sleep(time.Millisecond * 10) // give the terminal a moment to catch up
}
return p.restoreTerminal()
}

Expand Down

0 comments on commit 7d6e0c2

Please sign in to comment.