diff --git a/examples/fullscreen/main.go b/examples/fullscreen/main.go index 2186d3d..e6d73b4 100644 --- a/examples/fullscreen/main.go +++ b/examples/fullscreen/main.go @@ -15,9 +15,12 @@ type model int type tickMsg time.Time func main() { - tea.AltScreen() - defer tea.ExitAltScreen() - err := tea.NewProgram(initialize, update, view).Start() + p := tea.NewProgram(initialize, update, view) + + p.EnterAltScreen() + err := p.Start() + p.ExitAltScreen() + if err != nil { log.Fatal(err) }