Add support for querying the DECAC settings #14990
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for querying the color indices set by the
DECAC
control, using the existing
DECRQSS
implementation.References and Relevant Issues
The initial
DECRQSS
support was added in PR #11152.The
DECAC
functionality was added in PR #13058, but at the time wedidn't know how to format the associated
DECRQSS
query.Detailed Description of the Pull Request / Additional comments
For most
DECRQSS
queries, the setting being requested is identified bythe final characters of its escape sequence. However, for the
DECAC
settings, you also need to include a parameter value, to indicate which
color item you're querying.
This meant we needed to extend the
DECRQSS
parser, so I also took thisopportunity to ensure we correctly parsed any parameter prefix chars. We
don't yet support any setting requiring a prefix, but this makes sure we
don't respond incorrectly if an app does query such a setting.
Validation Steps Performed
Thanks to @al20878, we've been able to test how these queries are parsed
on a real VT525 terminal, and I've manually verified our implementation
matches that behavior.
I've also extended the existing
DECRQSS
unit test to confirm that weare responding to the
DECAC
queries as expected.PR Checklist