forked from Mirrors/bubbletea
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:
parent
d86cb562f0
commit
5ec2c0712a
1
tea.go
1
tea.go
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue