nsf / termbox-go

Pure Go termbox implementation
http://godoc.org/github.com/nsf/termbox-go
MIT License
4.67k stars 373 forks source link

How to enable cursor and avoid clean the screen? #182

Closed manuel-rubio closed 1 year ago

manuel-rubio commented 6 years ago

I was using termbox for a project but I need to continue in the same screen and don't clean the screen. How can I achieve that? Thanks.

nsf commented 6 years ago

Not sure what you mean. But probably the fact that when termbox is initialized it clears the screen and then does so again when you go back to terminal. It's intentional. Termbox is not for drawing things in CLI mode. It's for full screen apps. If you need some progress bars or something for just half of the screen (ala docker). There are probably other libs to do so.

mikijov commented 6 years ago

I had a similar question. It is not a big deal for me. But my reason for not clearing the screen is that I want the user to feel like is continuing the work before and after calling my app. Yes, I would draw full screen eventually, but the experience of starting and exiting would be better in my case if my app continued where the last one stopped.

While I would find this useful it is not a high priority for me.

samliddicott commented 6 years ago

What when termbox UI is used to reboot the box and/or kill an SSH session? The terminal is then left in a bad condition, which box graphics characters showing, and a maybe hidden cursor. It would be nice, if when reaching an idle state, termbox could take the terminal out of graphics mode, so that dropped connections are less likely to leave a useless terminal state. It would be nice if this could be done deliberately, and show the cursor.

alessio commented 3 years ago

I want the user to feel like is continuing the work before and after calling my app.

I'm exactly in the same position. Any updates?