-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support full per-cell SGR styling in all text #4
Comments
Quick note that I'm interested in this too, as the TUI debugger I just started working on will want marked up text all over the place. |
Yeah, it's an active member of the short list. At the moment I'm figuring out how to do scrollable regions without killing performance or wasting a pile of memory, but there's overlap between the two projects, because we want the combination of span styling and scrollable areas to also be reasonably efficient. Otherwise scrolling around in a long heavily marked up text file (e.g. module source) is going to suck. In the mean time, a status update: I've marked the first task in this issue as done, based on https://github.com/japhb/Terminal-Widgets/blob/main/lib/Terminal/Widgets/SpanStyle.rakumod and https://github.com/japhb/Terminal-Widgets/blob/main/lib/Terminal/Widgets/ColorTheme.rakumod . I've also marked the third task done, because I think https://github.com/japhb/Terminal-Widgets/blob/main/examples/form.raku#L40-L65 is Good Enough For Now. ™️ |
Sounds great! Thanks for all the work you put into this. T::W is bit by bit turning into an epic piece of software. :-D |
Major progress on my last comment; the following new files -- plus some miscellaneous bugfixes and cleanups -- implement scrollable span-highlighted buffers, and the scrollbars to go with them:
I also rewrote Viewer::Log based on SpanBuffer, and at HEAD the form example now supports arbitrary scrolling of the span-colored logs. |
Terminal::Widgets 0.1.5 now released with these changes. |
Wow, that was fast. Thanks! Now it's on me to actually make use of the new features! |
Please do let me know what you need next -- a GH issue is fine -- or if you run into any issues with what I've done so far. :-) |
Based on discussions in #3 .
At the moment, in most places in Terminal::Widgets where ANSI SGR styling can be applied, full lines of text (or even entire widgets) can only have one style, but in the future it should be possible to apply arbitrary spanwise styling, including down to the level of styling individual terminal display cells.
Necessary prerequisite bits:
The text was updated successfully, but these errors were encountered: