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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14990
Author: @j4james
Created: 3/14/2023
Status: Merged
Merged: 3/17/2023
Merged by: @DHowett

Base: mainHead: feature-decac-query


📝 Commits (2)

  • f19a4de Add support for querying DECAC settings.
  • e3ab800 Add to the existing DECRQSS unit test.

📊 Changes

3 files changed (+85 additions, -6 deletions)

View changed files

📝 src/terminal/adapter/adaptDispatch.cpp (+60 -6)
📝 src/terminal/adapter/adaptDispatch.hpp (+1 -0)
📝 src/terminal/adapter/ut_adapter/adapterTest.cpp (+24 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/14990 **Author:** [@j4james](https://github.com/j4james) **Created:** 3/14/2023 **Status:** ✅ Merged **Merged:** 3/17/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `feature-decac-query` --- ### 📝 Commits (2) - [`f19a4de`](https://github.com/microsoft/terminal/commit/f19a4de0f8040779d440abaa9a640b39c170d79d) Add support for querying DECAC settings. - [`e3ab800`](https://github.com/microsoft/terminal/commit/e3ab8004c1f90e86ee1b2e596b71ffaa10f79678) Add to the existing DECRQSS unit test. ### 📊 Changes **3 files changed** (+85 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/adapter/adaptDispatch.cpp` (+60 -6) 📝 `src/terminal/adapter/adaptDispatch.hpp` (+1 -0) 📝 `src/terminal/adapter/ut_adapter/adapterTest.cpp` (+24 -0) </details> ### 📄 Description 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:40:09 +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#30329