-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for restoring a DECCTR color table report (#13139)
This PR introduces the framework for the `DECRSTS` sequence which is used to restore terminal state reports. But to start with, I've just implemented the `DECCTR` color table report, which provides a way for applications to alter the terminal's color scheme. ## PR Checklist * [x] Closes #13132 * [x] CLA signed. * [x] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments I've added the functions for parsing DEC RGB and HLS color formats into the `Utils` class, where we've got all our other color parsing routines, since this functionality will eventually be needed in other VT protocols like Sixel and ReGIS. Since `DECRSTS` is a `DCS` sequence, this only works in conhost for now, or when using the experimental passthrough mode in Windows Terminal. ## Validation Steps Performed I've added a number of unit tests to check that the `DECCTR` report is being interpreted as expected. This includes various edge cases (e.g. omitted and out-of-range parameters), which I have confirmed to match the color parsing on a real VT240 terminal.
- Loading branch information
Showing
11 changed files
with
414 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.