Teminal doesn't preserve colored blocks of characters. #6047

Closed
opened 2026-01-31 00:28:34 +00:00 by claunia · 4 comments
Owner

Originally created by @elbertlev on GitHub (Jan 19, 2020).

Environment

Windows build number: 10.0.18362.592
Windows Terminal version (if applicable): 0.8.10091.0

Steps to reproduce

  1. Launch the Windows Terminal (it opens the Powershell tab)
  2. Run any of the color16.bat (or any other .bat file) file from https://gist.github.com/k-takata/2d4f562bacf8bae6691973a540970117#file-color256_block-sh
  3. The colored block is drown
  4. Resize the terminal window and observe the colored block disappears.

Expected behavior

The colored block should be preserved
image

Actual behavior

The colored block disappears.
Note. The same behaviour in all kinds of shells it terminal (cmd, bash) and in standalone cmd.exe

Originally created by @elbertlev on GitHub (Jan 19, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.592 Windows Terminal version (if applicable): 0.8.10091.0 ``` # Steps to reproduce 1. Launch the Windows Terminal (it opens the Powershell tab) 2. Run any of the color16.bat (or any other .bat file) file from https://gist.github.com/k-takata/2d4f562bacf8bae6691973a540970117#file-color256_block-sh 3. The colored block is drown 4. Resize the terminal window and observe the colored block disappears. # Expected behavior The colored block should be preserved ![image](https://user-images.githubusercontent.com/34284289/72690159-4e53a500-3ace-11ea-92b2-83c557c21fcf.png) # Actual behavior The colored block disappears. Note. The same behaviour in all kinds of shells it terminal (cmd, bash) and in standalone cmd.exe
Author
Owner

@zadjii-msft commented on GitHub (Jan 19, 2020):

Yea, this is true. Since the console buffer can't know the difference between "no character" and "space", when the console buffer resizes, it doesn't know to copy that color information over. This is technically the same bug as #32 - I'll leave it to the rest of the team to decide if this should be left open or closed as a dupe.

@zadjii-msft commented on GitHub (Jan 19, 2020): Yea, this is true. Since the console buffer can't know the difference between "no character" and "space", when the console buffer resizes, it doesn't know to copy that color information over. This is technically the same bug as #32 - I'll leave it to the rest of the team to decide if this should be left open or closed as a dupe.
Author
Owner

@elbertlev commented on GitHub (Jan 21, 2020):

Thank you for prompt response. I believe I found the reason for such behavior.
Let's start with cmd.exe. It behaves exactly the same way as terminal if "Wrap text output on resize" is enabled. If disabled it works as it should.
The terminal settings do not include such option (at least I don't know how to disable wrapping).

I think it is possible to make cmd and terminal work correctly with wrapping, but don't know is it worth the efforts. After all you are mimicking the full screen mode. Maybe documenting is enough. Also it would be nice to check the behavior of a real Linux terminal.

@elbertlev commented on GitHub (Jan 21, 2020): Thank you for prompt response. I believe I found the reason for such behavior. Let's start with cmd.exe. It behaves exactly the same way as terminal if "Wrap text output on resize" is enabled. If disabled it works as it should. The terminal settings do not include such option (at least I don't know how to disable wrapping). I think it is possible to make cmd and terminal work correctly with wrapping, but don't know is it worth the efforts. After all you are mimicking the full screen mode. Maybe documenting is enough. Also it would be nice to check the behavior of a real Linux terminal.
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 23, 2020):

I'm gonna call this one officially a /dup of #32. Thanks!

@DHowett-MSFT commented on GitHub (Jan 23, 2020): I'm gonna call this one officially a /dup of #32. Thanks!
Author
Owner

@ghost commented on GitHub (Jan 23, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jan 23, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. 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#6047