[PR #11982] [MERGED] Replace GetDefaultBrushColors with hardcoded default attributes #28818

Open
opened 2026-01-31 09:30:57 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11982
Author: @j4james
Created: 12/16/2021
Status: Merged
Merged: 1/3/2022
Merged by: @undefined

Base: mainHead: nuke-getdefaultbrushcolors


📝 Commits (1)

  • 717a9b0 Replace GetDefaultBrushColors with hardcoded value.

📊 Changes

8 files changed (+2 additions, -28 deletions)

View changed files

📝 src/cascadia/PublicTerminalCore/HwndTerminal.cpp (+1 -1)
📝 src/cascadia/TerminalCore/Terminal.hpp (+0 -1)
📝 src/cascadia/TerminalCore/terminalrenderdata.cpp (+0 -5)
📝 src/host/renderData.cpp (+0 -11)
📝 src/host/renderData.hpp (+0 -2)
📝 src/host/ut_host/VtIoTests.cpp (+0 -5)
📝 src/renderer/base/renderer.cpp (+1 -1)
📝 src/renderer/inc/IRenderData.hpp (+0 -2)

📄 Description

The IRenderData::GetDefaultBrushColors method was intended to return
the default attributes from which the renderer would calculate the
default background color. It should always have been returning a default
TextAttribute object, but the conhost RenderData implementation was
mistakenly returning the active attributes instead. This resulted in
margin areas being filled with the wrong color. To correct that, this PR
simply replaces all usage of GetDefaultBrushColors with hardcoded
default attributes.

Validation Steps Performed

I've manually checked the test case described in issue #11976 and
confirmed that the conhost margin areas are now correctly filled with
the default background color.

Closes #11976


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11982 **Author:** [@j4james](https://github.com/j4james) **Created:** 12/16/2021 **Status:** ✅ Merged **Merged:** 1/3/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `nuke-getdefaultbrushcolors` --- ### 📝 Commits (1) - [`717a9b0`](https://github.com/microsoft/terminal/commit/717a9b00411f78d6e0099e77b6e497cc7572d72e) Replace GetDefaultBrushColors with hardcoded value. ### 📊 Changes **8 files changed** (+2 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/PublicTerminalCore/HwndTerminal.cpp` (+1 -1) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+0 -1) 📝 `src/cascadia/TerminalCore/terminalrenderdata.cpp` (+0 -5) 📝 `src/host/renderData.cpp` (+0 -11) 📝 `src/host/renderData.hpp` (+0 -2) 📝 `src/host/ut_host/VtIoTests.cpp` (+0 -5) 📝 `src/renderer/base/renderer.cpp` (+1 -1) 📝 `src/renderer/inc/IRenderData.hpp` (+0 -2) </details> ### 📄 Description The `IRenderData::GetDefaultBrushColors` method was intended to return the default attributes from which the renderer would calculate the default background color. It should always have been returning a default `TextAttribute` object, but the conhost `RenderData` implementation was mistakenly returning the active attributes instead. This resulted in margin areas being filled with the wrong color. To correct that, this PR simply replaces all usage of `GetDefaultBrushColors` with hardcoded default attributes. ## Validation Steps Performed I've manually checked the test case described in issue #11976 and confirmed that the conhost margin areas are now correctly filled with the default background color. Closes #11976 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:30:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28818