mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
feat: support a Clear command
This commit is contained in:
committed by
Christian Muehlhaeuser
parent
37b79f55f1
commit
6e1065830a
@@ -245,6 +245,14 @@ func (r *standardRenderer) repaint() {
|
||||
r.lastRender = ""
|
||||
}
|
||||
|
||||
func (r *standardRenderer) clearScreen() {
|
||||
r.mtx.Lock()
|
||||
defer r.mtx.Unlock()
|
||||
|
||||
r.out.ClearScreen()
|
||||
r.out.MoveCursor(1, 1)
|
||||
}
|
||||
|
||||
func (r *standardRenderer) altScreen() bool {
|
||||
return r.altScreenActive
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user