Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for private options in DSR queries #14290

Merged
3 commits merged into from
Oct 25, 2022

Conversation

j4james
Copy link
Collaborator

@j4james j4james commented Oct 25, 2022

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

@ghost ghost added Area-VT Virtual Terminal sequence support Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase labels Oct 25, 2022
@j4james j4james marked this pull request as ready for review October 25, 2022 15:03
@@ -209,7 +209,7 @@ namespace Microsoft::Console::VirtualTerminal
class FlaggedEnumValue
{
public:
static constexpr VTInt mask{ WI_StaticAssertSingleBitSet(Flag) };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, was this causing trouble? Sorry!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that was a bit confusing. I couldn't figure out why it would suddenly have a problem with that, but when Flag is 0 that doesn't count as a single bit. I'm assuming it didn't complain before because we hadn't actually used the ANSI modes yet.

@carlos-zamora
Copy link
Member

@msftbot merge this in 10 minutes

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Oct 25, 2022
@ghost
Copy link

ghost commented Oct 25, 2022

Hello @carlos-zamora!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I won't merge this pull request until after the UTC date Tue, 25 Oct 2022 18:40:01 GMT, which is in 10 minutes

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@ghost ghost merged commit afefe69 into microsoft:main Oct 25, 2022
@j4james j4james deleted the feature-private-dsr branch December 26, 2022 20:53
@ghost
Copy link

ghost commented Jan 24, 2023

🎉Windows Terminal Preview v1.17.1023 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VT Virtual Terminal sequence support AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Product-Conhost For issues in the Console codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor the VT DSR handler to support both ANSI and private options
4 participants