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 the DECALN escape sequence #3968

Merged
2 commits merged into from
Dec 17, 2019
Merged

Conversation

j4james
Copy link
Collaborator

@j4james j4james commented Dec 14, 2019

Summary of the Pull Request

This adds support for the DECALN escape sequence, which produces a kind of test pattern, originally used on VT terminals to adjust the screen alignment. It's needed to pass several of the tests in the Vttest suite.

PR Checklist

  • Closes Add support for the DECALN escape sequence #3671
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

To start with, the ActionEscDispatch method in the OutputStateMachineEngine needed to be extended to check for a new intermediate type (#). Then when that intermediate is followed by an 8, it dispatches to a new ScreenAlignmentPattern method in the ITermDispatch interface.

The implementation of the ScreenAlignmentPattern itself is fairly simple. It uses the recently added PrivateFillRegion API to fill the screen with the character E using default attributes. Then in addition to that, a bunch of VT properties are reset:

  • The meta/extended attributes are reset (although the active colors must be left unchanged).
  • The origin mode is set to absolute positioning.
  • The scrolling margins are cleared.
  • The cursor position is moved to home.

Validation Steps Performed

I've added a screen buffer test that makes sure the DECALN sequence fills the screen with the correct character and attributes, and that the above mentioned properties are all updated appropriately.

I've also tested in Vttest, and confirmed that the first two pages of the Test of cursor movements are now showing the frame of E's that are expected there.

@zadjii-msft zadjii-msft added Area-VT Virtual Terminal sequence support Product-Conhost For issues in the Console codebase labels Dec 16, 2019
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Yea this one's pretty straightforward. Thanks!

@zadjii-msft zadjii-msft added AutoMerge Marked for automatic merge by the bot when requirements are met Needs-Second It's a PR that needs another sign-off labels Dec 17, 2019
@ghost
Copy link

ghost commented Dec 17, 2019

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit c0b8b85 into microsoft:master Dec 17, 2019
@j4james j4james deleted the feature-decaln branch January 12, 2020 20:44
@ghost
Copy link

ghost commented Jan 14, 2020

🎉Windows Terminal Preview v0.8.10091.0 has been released which incorporates this pull request.:tada:

Handy links:

@DHowett-MSFT
Copy link
Contributor

🎉 Once again, thanks for the contribution!

This pull request was included in a set of conhost changes that was just
released with Windows Insider Build 19603.

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 Needs-Second It's a PR that needs another sign-off Product-Conhost For issues in the Console codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for the DECALN escape sequence
4 participants