From 5ec2c0712af2b65cf66932cf4d77e246153fdb6c Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Mon, 22 Jun 2020 20:47:35 -0400 Subject: [PATCH] Move cursor to (0,0) when entering the altscreen This should fix cases in some terminals where the following paint is vertically offset. --- tea.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tea.go b/tea.go index 5c4df51..794eaf2 100644 --- a/tea.go +++ b/tea.go @@ -193,6 +193,7 @@ func (p *Program) EnterAltScreen() { p.mtx.Lock() defer p.mtx.Unlock() fmt.Fprintf(p.output, te.CSI+te.AltScreenSeq) + moveCursor(p.output, 0, 0) } // ExitAltScreen exits the alternate screen buffer.