From e119cd88b271b0cc6f69c12595bcab892e470727 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sun, 9 Oct 2022 05:41:12 +0200 Subject: [PATCH] fix: prevent double repaint when restoring terminal --- tea.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tea.go b/tea.go index 75e4cbf..c0251f9 100644 --- a/tea.go +++ b/tea.go @@ -572,10 +572,11 @@ func (p *Program) RestoreTerminal() error { if p.altScreenWasActive { p.renderer.enterAltScreen() + } else { + // entering alt screen already causes a repaint. + go p.Send(repaintMsg{}) } - go p.Send(repaintMsg{}) - return nil }