Terminal: SGR 0 doesn't work correctly when combined with meta attributes

Created on 13 Apr 2020  路  3Comments  路  Source: microsoft/terminal

Environment

Windows build number: Version 10.0.18362.657
Windows Terminal version (if applicable): Commit ea1bb2ed9359fcc6ded32ad11a8cab544b91ae0e

Steps to reproduce

From a bash shell in conhost, execute the following command:

printf "\e[0;7mReverse\e[0;4mUnderline\e[m\n"

Expected behavior

It should display the first word with reversed video, and the second word underlined.

For example, here's what it looks like in mintty:

image

Actual behavior

The SGR 0 in the second sequence doesn't take effect, so the second word is both underlined and reversed.

image

Area-VT Issue-Bug Needs-Tag-Fix Priority-2 Product-Conhost Resolution-Fix-Committed

Most helpful comment

No need for a rush fix on this one. I'll yank the triage tag off (and leave it in 21H1). Thanks for being our VT champion!

All 3 comments

I should mention that I'm currently experimenting with a refactor of the SGR code, based on a discussion we had in PR https://github.com/microsoft/terminal/pull/3160#discussion_r341249386. That refactoring actually fixes this bug (which is how I discovered it in the first place), but it's still a work in progress, and may be in that state for a while. However, if there is an urgent need for this to be fixed I can probably put together a simpler PR targetting just this bug.

No need for a rush fix on this one. I'll yank the triage tag off (and leave it in 21H1). Thanks for being our VT champion!

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

Handy links:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CobusKruger picture CobusKruger  路  60Comments

HLFH picture HLFH  路  68Comments

NOFUNEVER picture NOFUNEVER  路  63Comments

Paul-Weisser picture Paul-Weisser  路  71Comments

NOFUNEVER picture NOFUNEVER  路  106Comments