Skip to content

Add support for DECSCNM in Windows Terminal #6622

@j4james

Description

@j4james

Description of the new feature/enhancement

When the DECSCNM mode was implemented in PR #3817, it was only actually added to conhost, but relied on the fact that the conpty renderer was passing through the translated colors (rather than the underlying buffer values), so it gave the impression that it worked in Windows Terminal as well. Once PR #6506 is merged, though, this will no longer be the case, so we need to add explicit support for DECSCNM in WT if we want to retain that functionality.

Proposed technical implementation details (optional)

In the conhost AdaptDispatch, we need to return false from the SetScreenMode method (when in conpty mode), to force the DECSCNM sequence to be passed through to the conpty pipe. Then on the WT side, we need to duplicate a lot of the AdaptDispatch implementation in TerminalDispatch, and update the renderdata GetForegroundColor and GetBackgroundColor calculations to take the reversed screen mode into account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VTVirtual Terminal sequence supportHelp WantedWe encourage anyone to jump in on these.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions