Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/spelling/allow/apis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ xlocnum
xloctime
XMax
xmemory
XMVECTOR
XMVECTORF
XParse
xpath
xstddef
Expand Down
1 change: 1 addition & 0 deletions .github/actions/spelling/expect/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ codepages
coinit
colorizing
COLORONCOLOR
colorref
COLORREFs
colorschemes
colorspec
Expand Down
2 changes: 2 additions & 0 deletions src/cascadia/TerminalControl/ControlCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
.scheme = renderSettings.GetColorTable(),
.foregroundAlias = renderSettings.GetColorAliasIndex(ColorAlias::DefaultForeground),
.backgroundAlias = renderSettings.GetColorAliasIndex(ColorAlias::DefaultBackground),
.generatePalette = renderSettings.GetRenderMode(Render::RenderSettings::Mode::Generate256Colors),
};
}
_terminal->UpdateColorScheme(scheme);
Expand All @@ -1041,6 +1042,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
}
renderSettings.SetColorAliasIndex(ColorAlias::DefaultForeground, stashedScheme.foregroundAlias);
renderSettings.SetColorAliasIndex(ColorAlias::DefaultBackground, stashedScheme.backgroundAlias);
renderSettings.SetRenderMode(Render::RenderSettings::Mode::Generate256Colors, stashedScheme.generatePalette);
_renderer->TriggerRedrawAll(true);
}
_stashedColorScheme.reset();
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalControl/ControlCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
std::array<COLORREF, TextColor::TABLE_SIZE> scheme;
size_t foregroundAlias;
size_t backgroundAlias;
bool generatePalette;
};
std::unique_ptr<StashedColorScheme> _stashedColorScheme;

Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalCore/ICoreSettings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ namespace Microsoft.Terminal.Core
Boolean IntenseIsBold { get; };
Boolean IntenseIsBright { get; };
AdjustTextMode AdjustIndistinguishableColors { get; };
Boolean GeneratePalette { get; };

// NOTE! When adding something here, make sure to update ControlProperties.h too!
};
Expand Down
7 changes: 4 additions & 3 deletions src/cascadia/TerminalCore/Terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ void Terminal::UpdateAppearance(const ICoreAppearance& appearance)
{
auto& renderSettings = GetRenderSettings();

renderSettings.SetRenderMode(RenderSettings::Mode::Generate256Colors, appearance.GeneratePalette());
renderSettings.SetRenderMode(RenderSettings::Mode::IntenseIsBold, appearance.IntenseIsBold());
renderSettings.SetRenderMode(RenderSettings::Mode::IntenseIsBright, appearance.IntenseIsBright());

Expand Down Expand Up @@ -1230,7 +1231,7 @@ void Terminal::_clearPatternTree()
// Method Description:
// - Returns the tab color
// If the starting color exists, its value is preferred
const std::optional<til::color> Terminal::GetTabColor() const
const std::optional<til::color> Terminal::GetTabColor()
{
if (_startingTabColor.has_value())
{
Expand Down Expand Up @@ -1493,14 +1494,14 @@ std::vector<MarkExtents> Terminal::GetMarkExtents() const
return _inAltBuffer() ? std::vector<MarkExtents>{} : _activeBuffer().GetMarkExtents();
}

til::color Terminal::GetColorForMark(const ScrollbarData& markData) const
til::color Terminal::GetColorForMark(const ScrollbarData& markData)
{
if (markData.color.has_value())
{
return *markData.color;
}

const auto& renderSettings = GetRenderSettings();
auto& renderSettings = GetRenderSettings();

switch (markData.category)
{
Expand Down
8 changes: 4 additions & 4 deletions src/cascadia/TerminalCore/Terminal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ class Microsoft::Terminal::Core::Terminal final :

void ClearMark();
void ClearAllMarks();
til::color GetColorForMark(const ScrollbarData& markData) const;
til::color GetColorForMark(const ScrollbarData& markData);

#pragma region ITerminalInput
// These methods are defined in Terminal.cpp
Expand Down Expand Up @@ -206,7 +206,7 @@ class Microsoft::Terminal::Core::Terminal final :
std::wstring GetHyperlinkCustomId(uint16_t id) const override;
std::vector<size_t> GetPatternId(const til::point location) const override;

std::pair<COLORREF, COLORREF> GetAttributeColors(const TextAttribute& attr) const noexcept override;
std::pair<COLORREF, COLORREF> GetAttributeColors(const TextAttribute& attr) noexcept override;
std::span<const til::point_span> GetSelectionSpans() const noexcept override;
std::span<const til::point_span> GetSearchHighlights() const noexcept override;
const til::point_span* GetSearchHighlightFocused() const noexcept override;
Expand Down Expand Up @@ -238,7 +238,7 @@ class Microsoft::Terminal::Core::Terminal final :

void UpdatePatternsUnderLock();

const std::optional<til::color> GetTabColor() const;
const std::optional<til::color> GetTabColor();

const size_t GetTaskbarState() const noexcept;
const size_t GetTaskbarProgress() const noexcept;
Expand Down Expand Up @@ -311,7 +311,7 @@ class Microsoft::Terminal::Core::Terminal final :
til::point SelectionEndForRendering() const;
SelectionEndpoint SelectionEndpointTarget() const noexcept;

TextCopyData RetrieveSelectedTextFromBuffer(const bool singleLine, const bool withControlSequences = false, const bool html = false, const bool rtf = false) const;
TextCopyData RetrieveSelectedTextFromBuffer(const bool singleLine, const bool withControlSequences = false, const bool html = false, const bool rtf = false);
#pragma endregion

#ifndef NDEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalCore/TerminalSelection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,7 @@ void Terminal::ClearSelection()
// Return Value:
// - Plain and formatted selected text from buffer. Empty string represents no data for that format.
// - If extended to multiple lines, each line is separated by \r\n
Terminal::TextCopyData Terminal::RetrieveSelectedTextFromBuffer(const bool singleLine, const bool withControlSequences, const bool html, const bool rtf) const
Terminal::TextCopyData Terminal::RetrieveSelectedTextFromBuffer(const bool singleLine, const bool withControlSequences, const bool html, const bool rtf)
{
TextCopyData data;

Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalCore/terminalrenderdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ std::vector<size_t> Terminal::GetPatternId(const til::point location) const
return {};
}

std::pair<COLORREF, COLORREF> Terminal::GetAttributeColors(const TextAttribute& attr) const noexcept
std::pair<COLORREF, COLORREF> Terminal::GetAttributeColors(const TextAttribute& attr) noexcept
{
return GetRenderSettings().GetAttributeColors(attr);
}
Expand Down
17 changes: 9 additions & 8 deletions src/cascadia/TerminalSettingsAppAdapterLib/TerminalSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,21 @@ namespace winrt::Microsoft::Terminal::Settings
break;
}

if (appearance.Foreground())
if (const auto v = appearance.Foreground())
{
_DefaultForeground = til::color{ appearance.Foreground().Value() };
_DefaultForeground = til::color{ v.Value() };
}
if (appearance.Background())
if (const auto v = appearance.Background())
{
_DefaultBackground = til::color{ appearance.Background().Value() };
_DefaultBackground = til::color{ v.Value() };
}
if (appearance.SelectionBackground())
if (const auto v = appearance.SelectionBackground())
{
_SelectionBackground = til::color{ appearance.SelectionBackground().Value() };
_SelectionBackground = til::color{ v.Value() };
}
if (appearance.CursorColor())
if (const auto v = appearance.CursorColor())
{
_CursorColor = til::color{ appearance.CursorColor().Value() };
_CursorColor = til::color{ v.Value() };
}
Comment on lines +233 to 248
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated cleanup.


if (const auto backgroundImage{ appearance.BackgroundImagePath() })
Expand Down Expand Up @@ -272,6 +272,7 @@ namespace winrt::Microsoft::Terminal::Settings
_IntenseIsBright = WI_IsFlagSet(appearance.IntenseTextStyle(), Microsoft::Terminal::Settings::Model::IntenseStyle::Bright);

_AdjustIndistinguishableColors = appearance.AdjustIndistinguishableColors();
_GeneratePalette = appearance.GeneratePalette();
_Opacity = appearance.Opacity();
_UseAcrylic = appearance.UseAcrylic();
}
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/Appearances.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
OBSERVABLE_PROJECTED_SETTING(_appearance, BackgroundImageAlignment);
OBSERVABLE_PROJECTED_SETTING(_appearance, IntenseTextStyle);
OBSERVABLE_PROJECTED_SETTING(_appearance, AdjustIndistinguishableColors);
OBSERVABLE_PROJECTED_SETTING(_appearance, GeneratePalette);
OBSERVABLE_PROJECTED_SETTING(_appearance, Foreground);
OBSERVABLE_PROJECTED_SETTING(_appearance, Background);
OBSERVABLE_PROJECTED_SETTING(_appearance, SelectionBackground);
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/Appearances.idl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ namespace Microsoft.Terminal.Settings.Editor
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Microsoft.Terminal.Settings.Model.ConvergedAlignment, BackgroundImageAlignment);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Microsoft.Terminal.Settings.Model.IntenseStyle, IntenseTextStyle);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Microsoft.Terminal.Core.AdjustTextMode, AdjustIndistinguishableColors);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Boolean, GeneratePalette);

OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, Foreground);
OBSERVABLE_PROJECTED_APPEARANCE_SETTING(Windows.Foundation.IReference<Microsoft.Terminal.Core.Color>, Background);
Expand Down
9 changes: 9 additions & 0 deletions src/cascadia/TerminalSettingsEditor/Appearances.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,15 @@
SelectedItem="{x:Bind CurrentAdjustIndistinguishableColors, Mode=TwoWay}"
Style="{StaticResource ComboBoxSettingStyle}" />
</local:SettingContainer>

<!-- Generate palette -->
<local:SettingContainer x:Uid="Profile_GeneratePalette"
ClearSettingValue="{x:Bind Appearance.ClearGeneratePalette}"
HasSettingValue="{x:Bind Appearance.HasGeneratePalette, Mode=OneWay}"
SettingOverrideSource="{x:Bind Appearance.GeneratePaletteOverrideSource, Mode=OneWay}">
<ToggleSwitch IsOn="{x:Bind Appearance.GeneratePalette, Mode=TwoWay}"
Style="{StaticResource ToggleSwitchInExpanderStyle}" />
</local:SettingContainer>
</StackPanel>

<!-- Grouping: Cursor -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,14 @@
<value>Automatic</value>
<comment>An option to choose from for the "adjust indistinguishable colors" setting. When selected, we will adjust the text colors for visibility only when the colors are part of this profile's color scheme's color table if and only if high contrast mode is enabled.</comment>
</data>
<data name="Profile_GeneratePalette.Header" xml:space="preserve">
<value>Generate palette</value>
<comment>A switch toggle that enables the use of an alternative color palette</comment>
</data>
<data name="Profile_GeneratePalette.HelpText" xml:space="preserve">
<value>When enabled, the extended 256-color palette is generated by interpolating between the basic theme colors instead of using the standard fixed palette.</value>
<comment>A description for a switch toggle that enables use of an alternative color palette</comment>
</data>
<data name="Profile_CursorShapeBar.Content" xml:space="preserve">
<value>Bar ( ┃ )</value>
<comment>{Locked="┃"} An option to choose from for the "cursor shape" setting. When selected, the cursor will look like a vertical bar. The character in the parentheses is used to show what it looks like.</comment>
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsModel/IAppearanceConfig.idl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ namespace Microsoft.Terminal.Settings.Model
INHERITABLE_APPEARANCE_SETTING(IMediaResource, PixelShaderImagePath);
INHERITABLE_APPEARANCE_SETTING(IntenseStyle, IntenseTextStyle);
INHERITABLE_APPEARANCE_SETTING(Microsoft.Terminal.Core.AdjustTextMode, AdjustIndistinguishableColors);
INHERITABLE_APPEARANCE_SETTING(Boolean, GeneratePalette);
INHERITABLE_APPEARANCE_SETTING(Single, Opacity);
INHERITABLE_APPEARANCE_SETTING(Boolean, UseAcrylic);
};
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsModel/MTSMSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Author(s):
X(IMediaResource, BackgroundImagePath, "backgroundImage", implementation::MediaResource::Empty()) \
X(Model::IntenseStyle, IntenseTextStyle, "intenseTextStyle", Model::IntenseStyle::Bright) \
X(Core::AdjustTextMode, AdjustIndistinguishableColors, "adjustIndistinguishableColors", Core::AdjustTextMode::Automatic) \
X(bool, GeneratePalette, "generatePalette", true) \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default indeed be true?

Copy link
Copy Markdown
Member Author

@lhecker lhecker Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, yes. For the vast majority of users, I expect the downside to be low.

More importantly, I have thought about ways to make this setting more discoverable. We could put it onto the compatibility page as well, given that it affects standard color rendering.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a fair chance that this is going to break some applications. These colors were always intended to be absolute values, and now we're replacing them with colors that could be completely different, potentially resulting in color combinations that are unreadable. If that happens you're going to have some very angry users.

Copy link
Copy Markdown
Member Author

@lhecker lhecker Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like, however, that this "fixes" the behavior when using a light theme. It also improves the stylistic look when using themes that aren't traditional (e.g. with a non-black background color).

While I believe that this would be most useful if enabled by default, it would certainly still be fine if we disable it instead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do like, however, that this "fixes" the behavior when using a light theme.

I would have thought the most common problem with light themes came from apps that are just using the 8 basic ANSI colors (when it's assumed that white is going to be visible on the default background color, and the default foreground color will be visible on black), and this mode doesn't help with that.

That said, I'm assuming there must be some apps that would benefit from it, and I'm sure some people will love it, but I'd be very wary of forcing it on everyone and expecting them to opt out if they don't like it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@j4james The default palette interpolates from black to white. As a result, using color 231 (white) on a white background is unreadable. The generated palette instead interpolates from background to foreground. So for a light theme, color 231 is dark and readable against the background.

Whether to set this as default is a difficult choice. I believe that quicker and wider adoption would lead program maintainers to consider the palette a viable choice and actually use it, making all the benefits a reality.

Though breaking changes are a big deal so I understand either way.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a result, using color 231 (white) on a white background is unreadable. The generated palette instead interpolates from background to foreground. So for a light theme, color 231 is dark and readable against the background.

I was talking about apps using the basic ANSI colors though. ANSI white 7 (or the bright white 15) is still going to be unreadable on a light background.

And apps that try to detect light color schemes, and then compensate by using dark colors from the 256-color palette, could actually end up being worse off with this mode (they might decide to use 16 or 17 in place of 231 when the color scheme is light, which would assumedly now have the opposite effect than what was intended).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was talking about apps using the basic ANSI colors though. ANSI white 7 (or the bright white 15) is still going to be unreadable on a light background.

Oh. I think ansi 7 for light themes should be dark. Like 15 should not mean bright white but instead intense/high contrast.

I understand this may not be the case for some base16 themes and will result in problems trying to use them for programs created with dark themes in mind. Though this will be an issue regardless.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ansi 7 for light themes should be dark.

Just looking at the color schemes here, that's not typical for a light color scheme. Regardless of whether the scheme is light or dark, ANSI black is typically black (or at least a dark color), and ANSI white is typically white/gray (or at least a lighter color).

There are obviously a lot of weird color schemes that do there own thing, but I thought it was generally expected that ANSI colors match their names, at least to some extent.

X(bool, UseAcrylic, "useAcrylic", false)

// Intentionally omitted Appearance settings:
Expand Down
4 changes: 2 additions & 2 deletions src/cascadia/UnitTests_SettingsModel/ColorSchemeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ namespace SettingsModelUnitTests
VERIFY_ARE_EQUAL(til::color(0xFF, 0xFF, 0xFF, 255), til::color{ scheme->CursorColor() });

std::array<COLORREF, COLOR_TABLE_SIZE> expectedCampbellTable;
const auto campbellSpan = std::span{ expectedCampbellTable };
Utils::InitializeColorTable(campbellSpan);
Utils::InitializeANSIColorTable(expectedCampbellTable);
Utils::InitializeExtendedColorTable(expectedCampbellTable);

for (size_t i = 0; i < expectedCampbellTable.size(); i++)
{
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/inc/ControlProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
X(winrt::Microsoft::Terminal::Core::CursorStyle, CursorShape, winrt::Microsoft::Terminal::Core::CursorStyle::Vintage) \
X(uint32_t, CursorHeight, DEFAULT_CURSOR_HEIGHT) \
X(til::color, SelectionBackground, DEFAULT_FOREGROUND) \
X(bool, GeneratePalette, true) \
X(bool, IntenseIsBold) \
X(bool, IntenseIsBright, true) \
X(winrt::Microsoft::Terminal::Core::AdjustTextMode, AdjustIndistinguishableColors, winrt::Microsoft::Terminal::Core::AdjustTextMode::Automatic)
Expand Down
2 changes: 1 addition & 1 deletion src/host/ApiRoutines.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ApiRoutines : public IApiRoutines
const bool isVisible) noexcept override;

//// driver will pare down for non-Ex method
void GetConsoleScreenBufferInfoExImpl(const SCREEN_INFORMATION& context,
void GetConsoleScreenBufferInfoExImpl(SCREEN_INFORMATION& context,
CONSOLE_SCREEN_BUFFER_INFOEX& data) noexcept override;

[[nodiscard]] HRESULT SetConsoleScreenBufferInfoExImpl(SCREEN_INFORMATION& context,
Expand Down
2 changes: 1 addition & 1 deletion src/host/getset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void ApiRoutines::GetConsoleOutputModeImpl(SCREEN_INFORMATION& context, ULONG& m
// Arguments:
// - context - The output buffer concerned
// - data - Receives structure filled with metadata about the output buffer
void ApiRoutines::GetConsoleScreenBufferInfoExImpl(const SCREEN_INFORMATION& context,
void ApiRoutines::GetConsoleScreenBufferInfoExImpl(SCREEN_INFORMATION& context,
CONSOLE_SCREEN_BUFFER_INFOEX& data) noexcept
{
try
Expand Down
4 changes: 2 additions & 2 deletions src/host/renderData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ std::vector<size_t> RenderData::GetPatternId(const til::point /*location*/) cons
// relevant table translation information and preferences.
// Return Value:
// - ARGB color values for the foreground and background
std::pair<COLORREF, COLORREF> RenderData::GetAttributeColors(const TextAttribute& attr) const noexcept
std::pair<COLORREF, COLORREF> RenderData::GetAttributeColors(const TextAttribute& attr) noexcept
{
const auto& renderSettings = ServiceLocator::LocateGlobals().getConsoleInformation().GetRenderSettings();
auto& renderSettings = ServiceLocator::LocateGlobals().getConsoleInformation().GetRenderSettings();
return renderSettings.GetAttributeColors(attr);
}

Expand Down
2 changes: 1 addition & 1 deletion src/host/renderData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class RenderData final :
std::wstring GetHyperlinkCustomId(uint16_t id) const override;
std::vector<size_t> GetPatternId(const til::point location) const override;

std::pair<COLORREF, COLORREF> GetAttributeColors(const TextAttribute& attr) const noexcept override;
std::pair<COLORREF, COLORREF> GetAttributeColors(const TextAttribute& attr) noexcept override;
bool IsSelectionActive() const override;
bool IsBlockSelection() const override;
void ClearSelection() override;
Expand Down
4 changes: 2 additions & 2 deletions src/host/screenInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ void SCREEN_INFORMATION::GetScreenBufferInformation(_Out_ til::size* pcoordSize,
_Out_ PWORD pwAttributes,
_Out_ til::size* pcoordMaximumWindowSize,
_Out_ PWORD pwPopupAttributes,
_Out_writes_(COLOR_TABLE_SIZE) LPCOLORREF lpColorTable) const
_Out_writes_(COLOR_TABLE_SIZE) LPCOLORREF lpColorTable)
{
const auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
auto& gci = ServiceLocator::LocateGlobals().getConsoleInformation();
*pcoordSize = GetBufferSize().Dimensions();

*pcoordCursorPosition = _textBuffer->GetCursor().GetPosition();
Expand Down
2 changes: 1 addition & 1 deletion src/host/screenInfo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class SCREEN_INFORMATION : public ConsoleObjectHeader, public Microsoft::Console
bool PostUpdateWindowSize() const;

// General Information
void GetScreenBufferInformation(til::size* size, til::point* cursorPosition, til::inclusive_rect* window, PWORD attributes, til::size* maximumWindowSize, PWORD popupAttributes, LPCOLORREF colorTable) const;
void GetScreenBufferInformation(til::size* size, til::point* cursorPosition, til::inclusive_rect* window, PWORD attributes, til::size* maximumWindowSize, PWORD popupAttributes, LPCOLORREF colorTable);
void GetRequiredConsoleSizeInPixels(til::size* requiredSize) const;
til::size GetMinWindowSizeInCharacters(til::size fontSize = { 1, 1 }) const;
til::size GetMaxWindowSizeInCharacters(til::size fontSize = { 1, 1 }) const;
Expand Down
9 changes: 3 additions & 6 deletions src/host/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ void Settings::ApplyDesktopSpecificDefaults()
_uHistoryBufferSize = 50;
_uNumberOfHistoryBuffers = 4;
_bHistoryNoDup = FALSE;

_renderSettings.ResetColorTable();

_fTrimLeadingZeros = false;
_fEnableColorSelection = false;
_uScrollScale = 1;
Expand Down Expand Up @@ -233,7 +230,7 @@ void Settings::InitFromStateInfo(_In_ PCONSOLE_STATE_INFO pStateInfo)
// - <none>
// Return Value:
// - a CONSOLE_STATE_INFO with the current state of this settings structure.
CONSOLE_STATE_INFO Settings::CreateConsoleStateInfo() const
CONSOLE_STATE_INFO Settings::CreateConsoleStateInfo()
{
CONSOLE_STATE_INFO csi = { 0 };
csi.ScreenAttributes = _wFillAttribute;
Expand Down Expand Up @@ -709,7 +706,7 @@ void Settings::SetColorTableEntry(const size_t index, const COLORREF color)
_renderSettings.SetColorTableEntry(index, color);
}

COLORREF Settings::GetColorTableEntry(const size_t index) const
COLORREF Settings::GetColorTableEntry(const size_t index)
{
return _renderSettings.GetColorTableEntry(index);
}
Expand All @@ -719,7 +716,7 @@ void Settings::SetLegacyColorTableEntry(const size_t index, const COLORREF color
SetColorTableEntry(TextColor::TransposeLegacyIndex(index), color);
}

COLORREF Settings::GetLegacyColorTableEntry(const size_t index) const
COLORREF Settings::GetLegacyColorTableEntry(const size_t index)
{
return GetColorTableEntry(TextColor::TransposeLegacyIndex(index));
}
Expand Down
Loading
Loading