Black background in Windows Terminal when using Cmd'er #13288

Closed
opened 2026-01-31 03:38:51 +00:00 by claunia · 6 comments
Owner

Originally created by @Hejle on GitHub (Apr 2, 2021).

Originally assigned to: @DHowett on GitHub.

When using Cmd'er inside windows terminal I get black bars under ther default text, which looks annoying.
I have been using Windows Terminal with Cmd'er since November 2020, and this is the first time I have had the issue.
The two lines at the bottom is how the black bar looks when I open the terminal - while resizing the terminal makes the whole line black. The issue is not present in any other terminal.

billede

I have followed this Medium-Blogpost to setup Cmd'er and Windows Terminal so it should be fairly simply to follow.

Lastly I run this on a Surface Pro running windows 10 pro version 19041.867

Originally created by @Hejle on GitHub (Apr 2, 2021). Originally assigned to: @DHowett on GitHub. When using Cmd'er inside windows terminal I get black bars under ther default text, which looks annoying. I have been using Windows Terminal with Cmd'er since November 2020, and this is the first time I have had the issue. The two lines at the bottom is how the black bar looks when I open the terminal - while resizing the terminal makes the whole line black. The issue is not present in any other terminal. ![billede](https://user-images.githubusercontent.com/18572997/113423727-4203f100-93cf-11eb-8491-436860bbbaee.png) I have followed this [Medium-Blogpost](https://medium.com/talpor/windows-terminal-cmder-%EF%B8%8F-573e6890d143) to setup Cmd'er and Windows Terminal so it should be fairly simply to follow. Lastly I run this on a Surface Pro running windows 10 pro version 19041.867
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 03:38:51 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 2, 2021):

Right, so, this happens when an application explicitly requests the black background color. On Consoles that existed before Windows Terminal, this would automatically resolve to "the DEFAULT background color". Unfortunately, since we have acrylic or an image or some other background color, we had to make it possible for applications to differentiate "background" from "black". Applications are generally well-behaved, and this works perfectly fine with well-behaved applications.

Do you happen to know the prompt settings for the default cmder/clink setup?

@DHowett commented on GitHub (Apr 2, 2021): Right, so, this happens when an application _explicitly requests_ the black background color. On Consoles that existed before Windows Terminal, this would automatically resolve to "the DEFAULT background color". Unfortunately, since we have acrylic or an image or some other background color, we had to make it possible for applications to differentiate "background" from "black". Applications are generally well-behaved, and this works perfectly fine with well-behaved applications. Do you happen to know the prompt settings for the default cmder/clink setup?
Author
Owner

@Hejle commented on GitHub (Apr 2, 2021):

Sorry, I don't know the promt-settings for the default cmder setup since I'm not completely sure where to find the prompt setting.. :)

It is possible that it is a cmder issue more than a windows terminal issue - just wanted to let it be known since I have Cmd'er/WT combo on my workpc without the black box. (Though not near the workpc due to easter).

@Hejle commented on GitHub (Apr 2, 2021): Sorry, I don't know the promt-settings for the default cmder setup since I'm not completely sure where to find the prompt setting.. :) It is possible that it is a cmder issue more than a windows terminal issue - just wanted to let it be known since I have Cmd'er/WT combo on my workpc without the black box. (Though not near the workpc due to easter).
Author
Owner

@DHowett commented on GitHub (Apr 2, 2021):

ALRIGHT, Found it!

c34eb73555/vendor/clink.lua (L50)

This is in the source for cmder. It comes with a "prompt hook" that prints some raw control sequences. Many of them are used to set the color (\x1b[...m).

The one that is using 40 (\x1b[1;32;40m) is requesting the black boxes, explicitly. 40 is the graphical representation code for "background in ANSI color 0 (which is typically black)".

Might have to mark this one external 😄

I will file the bug on cmder, as I have the most context here. We had to file a similar bug on PowerShell, after all!

@DHowett commented on GitHub (Apr 2, 2021): ALRIGHT, Found it! https://github.com/cmderdev/cmder/blob/c34eb735556d5f2ccf59b042d17d5f2880414356/vendor/clink.lua#L50 This is in the source for cmder. It comes with a "prompt hook" that prints some raw control sequences. Many of them are used to set the color (`\x1b[...m`). The one that is using `40` (`\x1b[1;32;40m`) is requesting the black boxes, explicitly. `40` is the graphical representation code for "background in ANSI color 0 (which is typically black)". Might have to mark this one external :smile: *I* will file the bug on cmder, as I have the most context here. We had to file a similar bug on PowerShell, after all!
Author
Owner

@Hejle commented on GitHub (Apr 2, 2021):

Thank you for the amazing explanation (Way more than I expected when I posted)! Have a good day!

@Hejle commented on GitHub (Apr 2, 2021): Thank you for the amazing explanation (Way more than I expected when I posted)! Have a good day!
Author
Owner

@DHowett commented on GitHub (Apr 2, 2021):

I've moved this upstream to /dup https://github.com/cmderdev/cmder/issues/2516

Thanks for the report!

@DHowett commented on GitHub (Apr 2, 2021): I've moved this upstream to /dup https://github.com/cmderdev/cmder/issues/2516 Thanks for the report!
Author
Owner

@ghost commented on GitHub (Apr 2, 2021):

Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!

@ghost commented on GitHub (Apr 2, 2021): Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13288