Terminal should support ANSI SGR 53 overline attribute #8278

Closed
opened 2026-01-31 01:25:16 +00:00 by claunia · 8 comments
Owner

Originally created by @rbanffy on GitHub (May 19, 2020).

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.

Windows Terminal on Windows

Gnome Terminal on Ubuntu

Originally created by @rbanffy on GitHub (May 19, 2020). # 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. ![Windows Terminal on Windows](https://user-images.githubusercontent.com/184714/82364538-52092100-9a07-11ea-92f2-d43396b06584.png) ![Gnome Terminal on Ubuntu](https://user-images.githubusercontent.com/184714/82364620-6a793b80-9a07-11ea-918a-068cd8fe809d.png)
Author
Owner

@zadjii-msft commented on GitHub (May 19, 2020):

Yep, we probably should.I'm mildly worried that the ExtendedAttributes enum used all the flags in a BYTE, but we'll figure it out.

c78f264b4b/src/inc/conattrs.hpp (L11-L24)

@zadjii-msft commented on GitHub (May 19, 2020): Yep, we probably should.I'm mildly worried that the `ExtendedAttributes` enum used all the flags in a `BYTE`, but we'll figure it out. https://github.com/microsoft/terminal/blob/c78f264b4b64b58589d4cb34697aaf4e18499266/src/inc/conattrs.hpp#L11-L24
Author
Owner

@DHowett commented on GitHub (May 19, 2020):

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

@DHowett commented on GitHub (May 19, 2020): 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
Author
Owner

@j4james commented on GitHub (May 19, 2020):

So for this one we also have the LVB gridline attributes, technically.

Yeah, I was just going to suggest using the COMMON_LVB_GRID_HORIZONTAL for this as a quick fix. It's no worse than our current usage of COMMON_LVB_UNDERSCORE for underline. I hacked together a quick implementation to test, and it looked OK to me. I'm not exactly sure where the overline is supposed to be rendered, but Mintty at least seems to have it at the very top of the cell. Haven't checked other implementations yet.

As for running out of bits in ExtendedAttributes , note that the lower byte of the _wAttrLegacy word is actually unused as far as I can tell, so we should have an additional 8 bits to play around with.

@j4james commented on GitHub (May 19, 2020): > So for this one we also have the LVB gridline attributes, technically. Yeah, I was just going to suggest using the `COMMON_LVB_GRID_HORIZONTAL` for this as a quick fix. It's no worse than our current usage of `COMMON_LVB_UNDERSCORE` for underline. I hacked together a quick implementation to test, and it looked OK to me. I'm not exactly sure where the overline is supposed to be rendered, but Mintty at least seems to have it at the very top of the cell. Haven't checked other implementations yet. As for running out of bits in `ExtendedAttributes` , note that the lower byte of the `_wAttrLegacy` word is actually unused as far as I can tell, so we should have an additional 8 bits to play around with.
Author
Owner

@DHowett commented on GitHub (May 19, 2020):

Lower byte of ... legacy ...

Holy crap! I never noticed this. That's clever/evil/cl-evil.

@DHowett commented on GitHub (May 19, 2020): > Lower byte of ... legacy ... Holy crap! I never noticed this. That's clever/evil/cl-evil.
Author
Owner

@zadjii-msft commented on GitHub (May 19, 2020):

I was just going to suggest using the COMMON_LVB_GRID_HORIZONTAL for this as a quick fix

That's brilliant and I love it

@zadjii-msft commented on GitHub (May 19, 2020): > I was just going to suggest using the `COMMON_LVB_GRID_HORIZONTAL` for this as a quick fix That's brilliant and I love it
Author
Owner

@j4james commented on GitHub (Jun 25, 2020):

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.

@j4james commented on GitHub (Jun 25, 2020): 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.
Author
Owner

@ghost commented on GitHub (Jul 22, 2020):

:tada:This issue was addressed in #6754, which has now been successfully released as Windows Terminal Preview v1.2.2022.0.🎉

Handy links:

@ghost commented on GitHub (Jul 22, 2020): :tada:This issue was addressed in #6754, which has now been successfully released as `Windows Terminal Preview v1.2.2022.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.2.2022.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@DHowett commented on GitHub (Aug 21, 2020):

🎉 As of Windows Insider build 20197, this is also supported in the traditional console.

@DHowett commented on GitHub (Aug 21, 2020): 🎉 As of Windows Insider build 20197, this is also supported in the traditional console.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8278