Background color not applied to space (ASCII 0x20) for a short duration after opening a new tab #18276

Closed
opened 2026-01-31 06:08:59 +00:00 by claunia · 2 comments
Owner

Originally created by @romkatv on GitHub (Aug 23, 2022).

Windows Terminal version

1.14.1962.0

Windows build number

10.0.19043.0

Other Software

No response

Steps to reproduce

  1. Install WSL1.
  2. Install Ubuntu 20.04.
  3. Configure Windows Terminal to start Ubuntu 20.04 when opening a new tab.
  4. Add the following two lines at the very top of ~/.bashrc on Ubuntu 20.04:
    printf 'red block: \033[41m \033[0m\n'
    return
    
  5. Open a new tab.

Expected Behavior

The top of the terminal contains text "red block:" followed by a red block. Like this:
image

Actual Behavior

The top of the terminal contains text "red block:" and is not followed by a red block. Like this:
image

If the following lines are added at the very top of ~/.bashrc:

printf '\n'
sleep 1
printf 'red block: \033[41m \033[0m\n'
return

Then the content of the terminal upon opening a new tab is as expected. Like this:
image

Note that both printf '\n' and sleep 1 are necessary for the red block to render correctly.

Originally created by @romkatv on GitHub (Aug 23, 2022). ### Windows Terminal version 1.14.1962.0 ### Windows build number 10.0.19043.0 ### Other Software _No response_ ### Steps to reproduce 1. Install WSL1. 2. Install Ubuntu 20.04. 3. Configure Windows Terminal to start Ubuntu 20.04 when opening a new tab. 4. Add the following two lines at the very top of `~/.bashrc` on Ubuntu 20.04: ```bash printf 'red block: \033[41m \033[0m\n' return ``` 5. Open a new tab. ### Expected Behavior The top of the terminal contains text "red block:" followed by a red block. Like this: ![image](https://user-images.githubusercontent.com/1282067/186113380-5e302aba-d79f-41a8-b65e-9c0621f3ef2e.png) ### Actual Behavior The top of the terminal contains text "red block:" and is not followed by a red block. Like this: ![image](https://user-images.githubusercontent.com/1282067/186113657-0dc9666e-8b0d-472b-9539-00e3ed2f6e80.png) If the following lines are added at the very top of `~/.bashrc`: ```bash printf '\n' sleep 1 printf 'red block: \033[41m \033[0m\n' return ``` Then the content of the terminal upon opening a new tab is as expected. Like this: ![image](https://user-images.githubusercontent.com/1282067/186114864-7e20d001-b3e4-4e28-ba0b-f5cc93ce6837.png) Note that both `printf '\n'` and `sleep 1` are necessary for the red block to render correctly.
claunia added the Needs-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 06:08:59 +00:00
Author
Owner

@j4james commented on GitHub (Aug 23, 2022):

This looks like #8341, which was addressed in v1.14.228, so I suspect you just need to upgrade.

@j4james commented on GitHub (Aug 23, 2022): This looks like #8341, which was addressed in v1.14.228, so I suspect you just need to upgrade.
Author
Owner

@romkatv commented on GitHub (Aug 23, 2022):

Indeed, it's the same issue. I was unable to find it because its title doesn't capture the nature of the problem very well.

Let's close this issue as a dup.

P.S.

I didn't verify the fix because I'm short on time and the bug doesn't affect me. Sorry.

@romkatv commented on GitHub (Aug 23, 2022): Indeed, it's the same issue. I was unable to find it because its title doesn't capture the nature of the problem very well. Let's close this issue as a dup. P.S. I didn't verify the fix because I'm short on time and the bug doesn't affect me. Sorry.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18276