chjj / blessed

A high-level terminal interface library for node.js.
Other
11.27k stars 533 forks source link

Scrollback #381

Open LoganDark opened 5 years ago

LoganDark commented 5 years ago

Most terminal emulators have native scrollback.

I'm thinking of using blessed for my terminal application, just so that command input can happen at the bottom of the screen despite logs (requests, etc..) being printed at the same time.

But, I don't want to use a scrollable container, which you won't be able to use once the application ends. I simply want to have a widget (text input) at the very bottom of the screen, and log output just pushes it down rather than just affecting some portion of the current screen area.

Is this supported or possible in any way?

cancerberoSgx commented 5 years ago

I would have two boxes, on at the top (big one, height: 90%) and a small one at the bottom of 3 rows height, both 100% width. Push all the logs to the first one and place the input text box in the bottom one. Didn't quite follow why can't you use scrollable container though. (the big box for the logs should be scrollable in my proposal).

LoganDark commented 5 years ago

@cancerberoSgx if you stop the app (i.e. quit, process.exit, ctrl+C) and scroll up, you will not see the previous logs that were off-screen when the app stopped.

I'm not talking about scrolling the logs in-app.