microsoft / microsoft/terminal
Background color attribute is filled incorrectly when resizing window
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
Windows Terminal version
1.20.11781.0
Windows build number
10.0.19045.4651
Other Software
print("\033[?1049h")
print("\033[31m")
print("test")
Steps to reproduce
Use Virtual Terminal Sequences. Change background, print some text, resize window (rows+1) or maximize window.
Expected Behavior
The following result was obtained using the Windows API:
set_console_text_attribute(hConsoleOutput, WHITE_FORE + RED_BACK + NORMAL_STYLE)
Actual Behavior
1 row red, the following ones are already filled in correctly.
maximize window.
restoring the window and then maximizing it again fixes this error.
but it doesn't help for a single row.
It is worth summing up. Attributes are filled into new buffer cells correctly when using Windows Console Api. When using virtual codes, the described problem is observed. Also in Windows Console (cmd.exe) any window scaling, in both Windows Api and virtual codes, causes attributes to be filled incorrectly.
But this is known, and I understand that you are releasing all fixes in Windows Terminal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the supplied Python Virtual Terminal Sequences, changing the background and resizing or maximizing the Windows Terminal window. Compare behavior with the Windows Console API and cmd.exe cases described in the report. Done means newly created or resized buffer cells retain the expected background attribute for both single-row and larger resizes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100