Skip to content

Handle rgb characteristics#9

Open
markeel wants to merge 3 commits intodeadpixi:masterfrom
markeel:handle_rgb_characteristics
Open

Handle rgb characteristics#9
markeel wants to merge 3 commits intodeadpixi:masterfrom
markeel:handle_rgb_characteristics

Conversation

@markeel
Copy link

@markeel markeel commented Jan 24, 2025

This change updates the libtmt to support all 16 colors and specified RGB characteristics for the SGL class of ANSI terminal codes. This is specifically needed to meaningfully support the modern implementation of powershell. It uses the "bright" versions of the colors and it uses hard-coded colors.

There are probably other issues about the way powershell uses ansi terminal codes that will need to be supported, but this handles the additional colors.

It specifically does NOT support the 256 color mode. At least in initial testing it did not seem that powershell used those terminal codes. It wouldn't be much of a stretch to support those too, but that should be tracked in a different request.

markeel and others added 3 commits November 17, 2024 21:53
These changes support notifications that allow an app to know
if lines have been scrolled out of the window.  This allows a
higher level system to maintain a scrollback buffer.
Specifically git rid of warnings for the windows VS compiler that
doesn't allow the buffer to be allocated dynamically on the stack
and change it to malloc and free.

Also handle the cursor positioning so that it doesn't go to the
next line unless there is actually a character past the end of the
buffer, since the windows terminal will send a CRCRLF sequence
when the end of the line is reached, and the writecharatcurs method
would have already inserted a line.  Also the Windows CMD.EXE tries
to write out a screen title by doing an OS command using <ESC>]0;
sequence which the handle_char now silently consumes.
Support the SGL codes for the "bright" standard colors and also
support the code for the complete specification of the color via
RGB.  This is to handle the requirements of a powershell's use of
the ansi terminal codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant