Text Rendering Bug: Incorrect Background Color on User Input with Light Themes #23519

Closed
opened 2026-01-31 08:44:32 +00:00 by claunia · 3 comments
Owner

Originally created by @warrenZY on GitHub (Aug 13, 2025).

Windows Terminal version

1.22.12111.0

Windows build number

No response

Other Software

Image Image

Steps to reproduce

  1. Open Windows Terminal.
  2. Go to Settings and select a light color scheme (e.g., Solarized Light) for your profile.
  3. Type a command or a sentence that is longer than one word (e.g., Dorothy lived in the midst of the great Kansas prairies...).
  4. Observe the rendering of the text on the screen.
    (To demonstrate the shift)
  5. Type a command, then type a punctuation mark (e.g., [), and then delete the punctuation mark with backspace.
  6. Type more characters and observe how the dark-colored region has shifted.

Expected Behavior

The entire text should have a single, consistent background color as defined by the color scheme's color, and the cursor should remain visible. The behavior should be consistent regardless of characters being added or deleted.

Actual Behavior

The background color of the text changes incorrectly. The first word have the correct background color, but the rest of the line displays a dark background color upon selection. Deleting a punctuation mark with backspace causes this dark region to shift forward by a single character width. This rendering issue makes the cursor invisible when it is within the dark background area.

Originally created by @warrenZY on GitHub (Aug 13, 2025). ### Windows Terminal version 1.22.12111.0 ### Windows build number _No response_ ### Other Software <img width="1115" height="628" alt="Image" src="https://github.com/user-attachments/assets/566ff97f-645b-4ecc-bc03-44cf7b432c86" /> <img width="1115" height="628" alt="Image" src="https://github.com/user-attachments/assets/af337328-6f81-48ec-9ea6-a84e9de1e28b" /> ### Steps to reproduce 1. Open Windows Terminal. 2. Go to Settings and select a light color scheme (e.g., Solarized Light) for your profile. 3. Type a command or a sentence that is longer than one word (e.g., Dorothy lived in the midst of the great Kansas prairies...). 4. Observe the rendering of the text on the screen. (To demonstrate the shift) 5. Type a command, then type a punctuation mark (e.g., [), and then delete the punctuation mark with backspace. 6. Type more characters and observe how the dark-colored region has shifted. ### Expected Behavior The entire text should have a single, consistent background color as defined by the color scheme's color, and the cursor should remain visible. The behavior should be consistent regardless of characters being added or deleted. ### Actual Behavior The background color of the text changes incorrectly. The first word have the correct background color, but the rest of the line displays a dark background color upon selection. Deleting a punctuation mark with backspace causes this dark region to shift forward by a single character width. This rendering issue makes the cursor invisible when it is within the dark background area.
claunia added the Needs-TriageIssue-Bug labels 2026-01-31 08:44:33 +00:00
Author
Owner

@warrenZY commented on GitHub (Aug 13, 2025):

The first image might not effectively showcase the bug. A revised image offering better clarity has been attached.
Image

@warrenZY commented on GitHub (Aug 13, 2025): The first image might not effectively showcase the bug. A revised image offering better clarity has been attached. <img width="1115" height="628" alt="Image" src="https://github.com/user-attachments/assets/bce1b6b2-0fdb-42b4-8336-3d550eb76a67" />
Author
Owner

@lhecker commented on GitHub (Aug 13, 2025):

See our pinned issue #18624.
tl;dr go here: https://learn.microsoft.com/en-us/windows/terminal/troubleshooting#black-lines-in-powershell-51-6x-70

@lhecker commented on GitHub (Aug 13, 2025): See our pinned issue #18624. tl;dr go here: https://learn.microsoft.com/en-us/windows/terminal/troubleshooting#black-lines-in-powershell-51-6x-70
Author
Owner

@warrenZY commented on GitHub (Aug 14, 2025):

See our pinned issue #18624. tl;dr go here: https://learn.microsoft.com/en-us/windows/terminal/troubleshooting#black-lines-in-powershell-51-6x-70

Thank you. It seems that the Windows PowerShell built into my new Windows installation did not come with the PSReadLine module mentioned in the article. I installed the module by running the following command, and the issue has now been resolved:

Install-Module -Name PSReadLine -Scope AllUsers -AllowClobber -Force

However, since this module comes pre-installed with higher versions of PowerShell (pwsh), why isn't it also pre-installed with the version of PowerShell that ships with Windows (10) ? (I have asked other users (win11) , and some of them seem to have version 2.0.0 of this module included by default in their Windows PowerShell).
Image

@warrenZY commented on GitHub (Aug 14, 2025): > See our pinned issue [#18624](https://github.com/microsoft/terminal/issues/18624). tl;dr go here: https://learn.microsoft.com/en-us/windows/terminal/troubleshooting#black-lines-in-powershell-51-6x-70 Thank you. It seems that the Windows PowerShell built into my new Windows installation did not come with the PSReadLine module mentioned in the article. I installed the module by running the following command, and the issue has now been resolved: Install-Module -Name PSReadLine -Scope AllUsers -AllowClobber -Force However, since this module comes pre-installed with higher versions of PowerShell (pwsh), why isn't it also pre-installed with the version of PowerShell that ships with Windows (10) ? (I have asked other users (win11) , and some of them seem to have version 2.0.0 of this module included by default in their Windows PowerShell). <img width="1112" height="363" alt="Image" src="https://github.com/user-attachments/assets/dfa7815a-248b-4147-b8c7-9784e02140ea" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23519