-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Environment
Windows build number: Version 10.0.18363.1198
Windows Terminal version (if applicable): Version: 1.5.3242.0
Steps to reproduce
- Open a bash shell in Window Terminal.
- Execute the following command:
printf "\e[40m\e[2J\e]4;0;rgb:00/00/80\e\\"; sleep 1; printf "\e#8\e]4;0;rgb:FF/00/00\e\\"
Expected behavior
This should erase the screen with background color 0, but with the 0 color palette set to blue. It then pauses for a second, before filling the screen with the alignment test pattern (which uses default colors), and changes the 0 color palette to bright red.
Since the screen is filled with the default colors of the test pattern before the palette is changed to red, you should never see that red.
Actual behavior
There's a brief moment when the screen flashes bright red before the test pattern appears.
If you enable the "debug tap" you can see what's going wrong. The palette change is passed through to the conpty connection as soon as it's encountered, whereas the test pattern is written to the conhost buffer and only passed through to conpty in the next paint cycle. You thus end up having the operations arrive out of order.
I'm guessing it's timing related, so it may not happen all the time, but I'm definitely seeing it a lot.