[PR #14998] Add support for the Presentation State reports #30345

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

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

State: closed
Merged: Yes


This PR introduces two new sequences, DECRQPSR and DECRSPS, which
provide a way for applications to query and restore the presentation
state reports. This includes the tab stop report (DECTABSR) and the
cursor information report (DECCIR).

One part of the cursor information report contains the character set
designations and mapped G-sets. But we weren't tracking that data in a
way that could easily be reported, so I needed to do some refactoring in
the TerminalOutput class to make that accessible.

Other than that, the rest was fairly straightforward. It was just a
matter of packaging up all the information into the correct format for
the returned DCS string, and in the case of the restore operations,
parsing the incoming data and applying the new state.

Validation Steps Performed

Thanks to @al20878, we were able to test these operations on a real
VT525, and I've manually verified that our implementation matches that
behavior. I've also added some unit tests covering both reports.

Closes #14984

**Original Pull Request:** https://github.com/microsoft/terminal/pull/14998 **State:** closed **Merged:** Yes --- This PR introduces two new sequences, `DECRQPSR` and `DECRSPS`, which provide a way for applications to query and restore the presentation state reports. This includes the tab stop report (`DECTABSR`) and the cursor information report (`DECCIR`). One part of the cursor information report contains the character set designations and mapped G-sets. But we weren't tracking that data in a way that could easily be reported, so I needed to do some refactoring in the `TerminalOutput` class to make that accessible. Other than that, the rest was fairly straightforward. It was just a matter of packaging up all the information into the correct format for the returned `DCS` string, and in the case of the restore operations, parsing the incoming data and applying the new state. ## Validation Steps Performed Thanks to @al20878, we were able to test these operations on a real VT525, and I've manually verified that our implementation matches that behavior. I've also added some unit tests covering both reports. Closes #14984
claunia added the pull-request label 2026-01-31 09:40:14 +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#30345