mirror of
https://github.com/rivo/tview.git
synced 2025-04-24 13:48:56 +08:00
Fix presentation demo appending TextView indefinitely
This commit is contained in:
parent
c6236f4421
commit
99c1df4191
@ -46,6 +46,11 @@ func TextView1(nextSlide func()) (title string, content tview.Primitive) {
|
||||
var n int
|
||||
for {
|
||||
n++
|
||||
if n > 512 {
|
||||
n = 1
|
||||
textView.SetText("")
|
||||
}
|
||||
|
||||
fmt.Fprintf(textView, "%d ", n)
|
||||
time.Sleep(200 * time.Millisecond)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user