[PR #14290] [MERGED] Add support for private options in DSR queries #30047

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14290
Author: @j4james
Created: 10/25/2022
Status: Merged
Merged: 10/25/2022
Merged by: @undefined

Base: mainHead: feature-private-dsr


📝 Commits (3)

  • 32fda38 Add framework for DEC private status reports
  • f93240d Add support for the DECXCPR report.
  • 03a9c0d Add unit tests for DECXCPR.

📊 Changes

9 files changed (+93 additions, -31 deletions)

View changed files

📝 src/terminal/adapter/DispatchTypes.hpp (+8 -4)
📝 src/terminal/adapter/ITermDispatch.hpp (+1 -1)
📝 src/terminal/adapter/adaptDispatch.cpp (+26 -12)
📝 src/terminal/adapter/adaptDispatch.hpp (+2 -2)
📝 src/terminal/adapter/termDispatch.hpp (+1 -1)
📝 src/terminal/adapter/ut_adapter/adapterTest.cpp (+32 -5)
📝 src/terminal/parser/OutputStateMachineEngine.cpp (+5 -1)
📝 src/terminal/parser/OutputStateMachineEngine.hpp (+1 -0)
📝 src/terminal/parser/ut_parser/OutputEngineTest.cpp (+17 -5)

📄 Description

The original implementation of the Device Status Report sequence was
only capable of handling ANSI status queries. This PR adds the ability
to respond to private DEC queries as well.

To prove it's working as intended, I've also included support for the
DEC extended cursor position report (DECXCPR), which is essentially
the same as the ANSI cursor position report, but with an additional
parameter indicating the page number. Until we support paging, though,
that value is just hardcoded to 1.

References

The method for distinguishing between ANSI options and the private DEC
options is based on the updates made to the SM/RM mode sequences in
PR #8469.

Validation Steps Performed

I've added a couple of unit tests covering the DECXCPR report, and
also manually confirmed we now pass the Extended Cursor-Position test
in vttest.

Closes #14206


🔄 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/14290 **Author:** [@j4james](https://github.com/j4james) **Created:** 10/25/2022 **Status:** ✅ Merged **Merged:** 10/25/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `feature-private-dsr` --- ### 📝 Commits (3) - [`32fda38`](https://github.com/microsoft/terminal/commit/32fda389878252a80b231644c855d0cef1f608f9) Add framework for DEC private status reports - [`f93240d`](https://github.com/microsoft/terminal/commit/f93240d704a65d91a2ae79b823ede89a902f2c45) Add support for the DECXCPR report. - [`03a9c0d`](https://github.com/microsoft/terminal/commit/03a9c0d0fb68b68a546533dd19156f1ccb26501c) Add unit tests for DECXCPR. ### 📊 Changes **9 files changed** (+93 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `src/terminal/adapter/DispatchTypes.hpp` (+8 -4) 📝 `src/terminal/adapter/ITermDispatch.hpp` (+1 -1) 📝 `src/terminal/adapter/adaptDispatch.cpp` (+26 -12) 📝 `src/terminal/adapter/adaptDispatch.hpp` (+2 -2) 📝 `src/terminal/adapter/termDispatch.hpp` (+1 -1) 📝 `src/terminal/adapter/ut_adapter/adapterTest.cpp` (+32 -5) 📝 `src/terminal/parser/OutputStateMachineEngine.cpp` (+5 -1) 📝 `src/terminal/parser/OutputStateMachineEngine.hpp` (+1 -0) 📝 `src/terminal/parser/ut_parser/OutputEngineTest.cpp` (+17 -5) </details> ### 📄 Description The original implementation of the _Device Status Report_ sequence was only capable of handling ANSI status queries. This PR adds the ability to respond to private DEC queries as well. To prove it's working as intended, I've also included support for the DEC extended cursor position report (`DECXCPR`), which is essentially the same as the ANSI cursor position report, but with an additional parameter indicating the page number. Until we support paging, though, that value is just hardcoded to 1. ## References The method for distinguishing between ANSI options and the private DEC options is based on the updates made to the `SM`/`RM` mode sequences in PR #8469. ## Validation Steps Performed I've added a couple of unit tests covering the `DECXCPR` report, and also manually confirmed we now pass the _Extended Cursor-Position_ test in vttest. Closes #14206 --- <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:38:21 +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#30047