Skip to content

Duplicate code in TermControl.cpp #11586

Closed
@serd2011

Description

@serd2011

While reading code in TermControl.cpp i stumble upon two lines of code that are absolutely the same and are called one after another.

const auto bg = newAppearance.DefaultBackground();
_changeBackgroundColor(bg);

const auto bg = newSettings.DefaultBackground();
_changeBackgroundColor(bg);

They are both called from TermControl::UpdateSettings()
_UpdateSettingsFromUIThread -> _ApplyUISettings and _UpdateAppearanceFromUIThread

Not sure if this is because of the situations in which this functions might be called separately but this just looks weird

Metadata

Metadata

Assignees

Labels

Area-CodeHealthIssues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc.Issue-TaskIt's a feature request, but it doesn't really need a major design.Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions