lotabout / tuikit

Tool kit for writing TUI applications in Rust.
MIT License
104 stars 28 forks source link

Scrolldown when printings reach the terminal's end #2

Closed sigmaSd closed 5 years ago

sigmaSd commented 5 years ago

Right now printings disappear after reaching the end of the terminal would be a great feature to scroll down automatically

lotabout commented 5 years ago

@sigmaSd Let me confirm what you mean by "scroll"? Suppose we allocate a screen with 3 lines, which one of the following

1 |                      |
2 |                 xxxxx| <- wrap to next line?
3 |xxx                   |
1 |                      |
2 |                      |
3 |                 xxxxx|
   xxx                     <- create a new line and possibly show scroll bar?

Besides, Term is at the lowest level and will only treat the screen as a table of cells and nothing else. What you'd like to have is some "widgets" that could handle buffering and scrolling. I am currently working on another project that try to do similar things. But right now, you have to handle it by yourself.

sigmaSd commented 5 years ago

I mean the second one create a new line and possibly show scroll bar, I understand I'll just handle it for now, thanks for the infos!