Add support for DECSWT (Set Window Title) #21325

Closed
opened 2026-01-31 07:41:01 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Feb 29, 2024).

Description of the new feature/enhancement

DECSWT is the DEC equivalent of XTerm's OSC 2 escape sequence, which sets the window title. As far as I understand, it's functionally identical - it just uses a different OSC number (21 rather than 2).

It's not widely implemented in modern terminals, but it's a trivial addition, and would provide support for applications intended to run on the original DEC hardware (at least the VT520 and VT525, possibly others).

Proposed technical implementation details (optional)

All it requires is a another enum value to be added to OscActionCodes, and an additional alias case here:
94e74d22c6/src/terminal/parser/OutputStateMachineEngine.cpp (L782-L784)

That said, ideally I'd like to fix some edge case issues with the existing title code at the same time, but I'll file a separate bug report for that.

Originally created by @j4james on GitHub (Feb 29, 2024). # Description of the new feature/enhancement `DECSWT` is the DEC equivalent of XTerm's `OSC 2` escape sequence, which sets the window title. As far as I understand, it's functionally identical - it just uses a different `OSC` number (21 rather than 2). It's not widely implemented in modern terminals, but it's a trivial addition, and would provide support for applications intended to run on the original DEC hardware (at least the VT520 and VT525, possibly others). # Proposed technical implementation details (optional) All it requires is a another enum value to be added to `OscActionCodes`, and an additional alias case here: https://github.com/microsoft/terminal/blob/94e74d22c65ecec7fb3baacb837527f254bddf1f/src/terminal/parser/OutputStateMachineEngine.cpp#L782-L784 That said, ideally I'd like to fix some edge case issues with the existing title code at the same time, but I'll file a separate bug report for that.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 07:41:01 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21325