Clear to end of line doesn't work correctly with reverse mode #18552

Open
opened 2026-01-31 06:17:31 +00:00 by claunia · 0 comments
Owner

Originally created by @RadAd on GitHub (Sep 27, 2022).

Windows Terminal version

1.15.2524.0

Windows build number

10.0.19044.2006

Other Software

No response

Steps to reproduce

Clear to end of line \x1b[0K not behaving correctly in combination with reverse mode \x1b[7m.

#include <cstdio>

int main()
{
    printf("\x1b[34;43mLine 1\x1b[0K\n");
    printf("\x1b[7mLine 2\x1b[0K\n");
    printf("\x1b[0m\x1b[0K\n");
}

Expected Behavior

Under the old console I get this:
image

Actual Behavior

In the new terminal I get this:
image

Originally created by @RadAd on GitHub (Sep 27, 2022). ### Windows Terminal version 1.15.2524.0 ### Windows build number 10.0.19044.2006 ### Other Software _No response_ ### Steps to reproduce Clear to end of line `\x1b[0K` not behaving correctly in combination with reverse mode `\x1b[7m`. ``` #include <cstdio> int main() { printf("\x1b[34;43mLine 1\x1b[0K\n"); printf("\x1b[7mLine 2\x1b[0K\n"); printf("\x1b[0m\x1b[0K\n"); } ``` ### Expected Behavior Under the old console I get this: ![image](https://user-images.githubusercontent.com/2518689/192430291-e4d28796-a17f-4b90-a61f-db4059b7b5b4.png) ### Actual Behavior In the new terminal I get this: ![image](https://user-images.githubusercontent.com/2518689/192430364-abc913ab-1d4e-42e1-9419-f9ac3c14c0ec.png)
claunia added the Resolution-By-DesignNeeds-TriageIssue-Bug labels 2026-01-31 06:17:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18552