mordak / Term48

50 stars 20 forks source link

Scroll terminal screen #28

Closed yamsergey closed 6 years ago

yamsergey commented 6 years ago

Is it possible to scroll terminal screen?

mordak commented 6 years ago

No, sorry. This was always on the roadmap but never got done, and I am not on BB10 anymore so is not going to get done. Try piping output to less, or using tmux (if you are working over ssh on a system with tmux or screen).

yamsergey commented 6 years ago

I see. Thank you for the response. Have you had any ideas how to do that, may I will take it up.

mordak commented 6 years ago

Implementing scrollback? It shouldn't be too bad. Term48 has an internal ring buffer for the lines of text, so more scrollback capacity is just making that larger. There are pointers for the top / bottom lines, and the insertion line, so you should be able to adjust those to change which lines are displayed when scrolling. Then implement gestures (or some other mechanism) to scroll up / down. Then it's just little details like snapping back to the insertion line on input, ensuring you cannot scroll past the first line, etc. Good luck!