-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Terminal should support ANSI SGR 53 overline attribute #6000
Comments
Yep, we probably should.I'm mildly worried that the Lines 11 to 24 in c78f264
|
So for this one we also have the LVB gridline attributes, technically. We need to figure out how they combine with underline/overline and grid bottom/top |
Yeah, I was just going to suggest using the As for running out of bits in |
Holy crap! I never noticed this. That's clever/evil/cl-evil. |
That's brilliant and I love it |
FYI, I've got a branch with this implemented, but it's built on top of #6506, so I'll only be able to do a PR once that's merged, which may be a while. |
## Summary of the Pull Request This PR adds support for the `SGR 53` and `SGR 55` escapes sequences, which enable and disable the ANSI _overline_ graphic rendition attribute, the equivalent of the console character attribute `COMMON_LVB_GRID_HORIZONTAL`. When a character is output with this attribute set, a horizontal line is rendered at the top of the character cell. ## PR Checklist * [x] Closes #6000 * [x] CLA signed. * [x] Tests added/passed * [ ] Documentation updated. * [ ] Schema updated. * [x] I've discussed this with core contributors already. ## Detailed Description of the Pull Request / Additional comments To start with, I added `SetOverline` and `IsOverlined` methods to the `TextAttribute` class, to set and get the legacy `COMMON_LVB_GRID_HORIZONTAL` attribute. Technically there was already an `IsTopHorizontalDisplayed` method, but I thought it more readable to add a separate `IsOverlined` as an alias for that. Then it was just a matter of adding calls to set and reset the attribute in response to the `SGR 53` and `SGR 55` sequences in the `SetGraphicsRendition` methods of the two dispatchers. The actual rendering was already taken care of by the `PaintBufferGridLines` method in the rendering engines. The only other change required was to update the `_UpdateExtendedAttrs` method in the `Xterm256Engine` of the VT renderer, to ensure the attribute state would be forwarded to the Windows Terminal over conpty. ## Validation Steps Performed I've extended the existing SGR unit tests to cover the new attribute in the `AdapterTest`, the `OutputEngineTest`, and the `VtRendererTest`. I've also manually tested the `SGR 53` and `SGR 55` sequences to confirm that they do actually render (or remove) an overline on the characters being output.
🎉This issue was addressed in #6754, which has now been successfully released as Handy links: |
🎉 As of Windows Insider build 20197, this is also supported in the traditional console. |
Description of the new feature/enhancement
Most recent terminal applications have extensive support for ANSI terminal commands and attributes. One extremely useful one is the overline (SGR 53) attribute that can be used for status lines and other similar uses.
The text was updated successfully, but these errors were encountered: