Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewriting scrollback buffer for live project listing in terminal #19

Open
stuartpb opened this issue Jan 21, 2018 · 1 comment
Open
Labels
tooling Tools for working with project definitions

Comments

@stuartpb
Copy link
Member

Since the C9 console doesn't support \e[3J (and wiping scrollback entirely is kind of gauche anyway), I'm wondering if it's possible to do something like \e[100F (when there are 100 lines printed in the current list), rewrite them, then \e[0J away anything else (if there are fewer lines, ie. because a project was deleted).

There's also making use of saving/restoring cursor position, or using the "scroll up / down" sequences, but I'm pretty sure these are going to be restricted to what's within the terminal's display space (and I fear the same is probably true of Cursor Previous Line as well).

Is there an elegant pager library for Node that would let me virtualize this? I want something like less, but with auto-updating contents (which I can't do with actual Less).

@stuartpb
Copy link
Member Author

I could probably throw something like a pager together reasonably simply with blessed - I imagine it's already got a widget for scrolling text.

The concern on my mind is, will that widget play nice with text that's already formatted with chalk? It'd suck if I have to go and rewrite the colorization logic with more complexity.

@stuartpb stuartpb added the tooling Tools for working with project definitions label Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Tools for working with project definitions
Projects
None yet
Development

No branches or pull requests

1 participant