SGR 0 doesn't work correctly when combined with meta attributes #7393

Open
opened 2026-01-31 01:02:47 +00:00 by claunia · 0 comments
Owner

Originally created by @j4james on GitHub (Apr 13, 2020).

Environment

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

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

Originally created by @j4james on GitHub (Apr 13, 2020). # 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](https://user-images.githubusercontent.com/4181424/79155064-7cdcd580-7dc8-11ea-9ab4-a8a6a919b3d5.png) # Actual behavior The `SGR 0` in the second sequence doesn't take effect, so the second word is both underlined and reversed. ![image](https://user-images.githubusercontent.com/4181424/79155101-89612e00-7dc8-11ea-9799-42defc72c26f.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7393