[PR #14990] Add support for querying the DECAC settings #30334

Open
opened 2026-01-31 09:40:10 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/14990

State: closed
Merged: Yes


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 we
didn'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 by
the 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 this
opportunity 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 we
are responding to the DECAC queries as expected.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/14990 **State:** closed **Merged:** Yes --- 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 we didn'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 by the 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 this opportunity 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 we are responding to the `DECAC` queries as expected. ## PR Checklist - [x] Closes #13091 - [x] Tests added/passed - [ ] Documentation updated - [ ] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:40:10 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30334