gizak / termui

Golang terminal dashboard
MIT License
13.14k stars 787 forks source link

termui.Close doesn't clean up everything and cause issue to re-init again after two or three times #100

Closed mehrdadrad closed 6 years ago

mehrdadrad commented 8 years ago

I noticed after two or three times try init and close then the init doesn't work properly! looks close doesn't revert everything as expected. I tried termbox-go directly (init and close sequentially) and it worked properly! If you want to duplicate this issue try /_example/dashboard.go as below: change main func to test func create new main func with multiple test function: func main() { for i := 0; i < 10; i++ { test() } } Once you press "q" to see the next dashboard, you can see less than three instead of 10 as the rest will be gone!

kenan-rhoton commented 7 years ago

So I've created a pull request that solves this. It's not the cleanest but hey, it does the job.

cjbassi commented 6 years ago

Closed with merge of #147