[PR #11982] Replace GetDefaultBrushColors with hardcoded default attributes #28823

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

Original Pull Request: https://github.com/microsoft/terminal/pull/11982

State: closed
Merged: Yes


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

**Original Pull Request:** https://github.com/microsoft/terminal/pull/11982 **State:** closed **Merged:** Yes --- 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
claunia added the pull-request label 2026-01-31 09:30:58 +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#28823