Move cursor to (0,0) when entering the altscreen

This should fix cases in some terminals where the following paint is
vertically offset.
This commit is contained in:
Christian Rocha 2020-06-22 20:47:35 -04:00
parent d86cb562f0
commit 5ec2c0712a
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018
1 changed files with 1 additions and 0 deletions

1
tea.go
View File

@ -193,6 +193,7 @@ func (p *Program) EnterAltScreen() {
p.mtx.Lock() p.mtx.Lock()
defer p.mtx.Unlock() defer p.mtx.Unlock()
fmt.Fprintf(p.output, te.CSI+te.AltScreenSeq) fmt.Fprintf(p.output, te.CSI+te.AltScreenSeq)
moveCursor(p.output, 0, 0)
} }
// ExitAltScreen exits the alternate screen buffer. // ExitAltScreen exits the alternate screen buffer.