Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of UpdateTerminalSettings #17009

Merged
merged 99 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
f353323
I wanted to do this in one shot but _zelda_
zadjii-msft May 12, 2023
4e14442
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Jul 17, 2023
ef6bb8a
hey look, it builds now
zadjii-msft Jul 17, 2023
5b3aa54
move GetNewTerminalArgs into IPaneContent
zadjii-msft Jul 17, 2023
84df819
close event
zadjii-msft Jul 17, 2023
7c9ffb0
snapping now uses an interface, so that it's not TermControl-specific
zadjii-msft Jul 18, 2023
a1da6c1
huge shuffling so that pane content can raise events instead of relyi…
zadjii-msft Jul 18, 2023
049c043
some last cleanups
zadjii-msft Jul 18, 2023
2dd8f40
[TO PARENT] dead code
zadjii-msft Jul 18, 2023
1b39db7
Single commit that adds the whole scratchpad and action
zadjii-msft Jul 18, 2023
63ba8e1
[PARENT] You know what, I just went for it.
zadjii-msft Jul 18, 2023
262d95a
[PARENT] try to use GetActiveTerminalControl less in TerminalTab
zadjii-msft Jul 18, 2023
2d40306
Let's just make it experimental
zadjii-msft Jul 18, 2023
e6dc314
Merge commit 'b4042ea' into dev/migrie/fhl/non-terminal-panes-2023
zadjii-msft Jul 19, 2023
e31202b
Merge commit '6a10ea5' into dev/migrie/fhl/non-terminal-panes-2023
zadjii-msft Jul 20, 2023
11126f9
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Jul 20, 2023
5f9add4
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Jul 20, 2023
a23c1a2
keybindings too
zadjii-msft Jul 20, 2023
5582e1b
[PARENT] You know what, I just went for it.
zadjii-msft Jul 18, 2023
f89368c
[PARENT] try to use GetActiveTerminalControl less in TerminalTab
zadjii-msft Jul 18, 2023
e0b003a
Merge branch 'main' into dev/migrie/fhl/non-terminal-panes-2023
zadjii-msft Jul 24, 2023
86914bd
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Jul 25, 2023
1cc9835
feature flags too
zadjii-msft Jul 27, 2023
cbd61b0
POC: yea, this works
zadjii-msft Jul 27, 2023
29d0d57
this works better than it has any right to
zadjii-msft Jul 27, 2023
fb7c809
derp
zadjii-msft Aug 1, 2023
842326d
icons for non-terminal pane content
zadjii-msft Aug 3, 2023
521e301
update settings should work now
zadjii-msft Aug 3, 2023
9531069
background brush, done
zadjii-msft Aug 7, 2023
c869b47
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Sep 11, 2023
46469aa
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Sep 11, 2023
6107c3e
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Sep 11, 2023
2086e0f
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Oct 13, 2023
b49997b
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Oct 13, 2023
57e1f26
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Oct 13, 2023
d726165
terrible, but it works
zadjii-msft Oct 13, 2023
e82c627
dead code removal
zadjii-msft Oct 13, 2023
81889a6
derp
zadjii-msft Oct 13, 2023
5f4087f
finish exorcising SettingsTab
zadjii-msft Oct 13, 2023
fb74fc8
dead code
zadjii-msft Oct 13, 2023
fd06409
annoying build break
zadjii-msft Oct 13, 2023
8df9523
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Oct 25, 2023
58e8f3c
mostly nits
zadjii-msft Oct 25, 2023
e9e04d4
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Oct 25, 2023
7bc1457
nits and such
zadjii-msft Oct 25, 2023
dd8606f
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Oct 25, 2023
389ba20
spel
zadjii-msft Oct 25, 2023
cf920e7
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Nov 2, 2023
4cec7e9
try to remove a few of these but ultimately, eh
zadjii-msft Nov 6, 2023
f622d80
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Nov 8, 2023
6bc711d
maybe I'm not that good at coding
zadjii-msft Nov 8, 2023
0d528f8
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Jan 19, 2024
3982358
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Feb 8, 2024
c244633
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Feb 8, 2024
092b355
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Feb 8, 2024
de5f7af
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Feb 28, 2024
25a8851
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Feb 28, 2024
17075d6
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Feb 28, 2024
0a11643
sanely pass around a cache instead of... whatever that was.
zadjii-msft Mar 4, 2024
4d47cd5
cleanup
zadjii-msft Mar 4, 2024
b6254f8
GREAT-GRANDPARENT: This fixes a crash in parent pane selection
zadjii-msft Mar 7, 2024
a3fbc64
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Mar 8, 2024
35651bc
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Mar 8, 2024
978fd6e
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 8, 2024
ef775a8
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Mar 18, 2024
524d658
GREAT-GREAT-GRANDPARENT: Hey when a pane wants to get closed, we shou…
zadjii-msft Mar 15, 2024
1951f30
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Mar 18, 2024
863840e
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 18, 2024
6789ec0
some of the easier nits
zadjii-msft Mar 19, 2024
fd8b083
get rid of this file
zadjii-msft Mar 19, 2024
052dc78
more nits
zadjii-msft Mar 19, 2024
a7533fa
eh these events are from pane content anyways!
zadjii-msft Mar 19, 2024
826fc08
hey there buddy, did you get lost?
zadjii-msft Mar 19, 2024
52970ef
RegisterBigTimeEncapsulationViolatingTerminalPaneContentEvents
zadjii-msft Mar 19, 2024
2357653
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Mar 20, 2024
c8d0c0a
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 20, 2024
e0bb840
Fix scratch pane for merge
zadjii-msft Mar 20, 2024
352e0a2
fix settings pane for merge
zadjii-msft Mar 20, 2024
bcceb85
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 20, 2024
2083b2f
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Mar 21, 2024
f1ab16e
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Mar 21, 2024
77022e9
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 21, 2024
df73d75
derp
zadjii-msft Mar 21, 2024
d417934
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Mar 21, 2024
216cc3f
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 21, 2024
61e952c
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/non-te…
zadjii-msft Mar 26, 2024
0979cd6
Merge branch 'dev/migrie/fhl/non-terminal-panes-2023' into dev/migrie…
zadjii-msft Mar 26, 2024
b6e4b62
Doesn't really need to be projected
zadjii-msft Mar 26, 2024
1d20599
un fix this file
zadjii-msft Mar 26, 2024
ddc88c8
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 26, 2024
10e1e46
ALSO doesn't really need to be projected
zadjii-msft Mar 26, 2024
7243d22
Merge remote-tracking branch 'origin/main' into dev/migrie/fhl/scratc…
zadjii-msft Mar 26, 2024
ef560bf
Merge branch 'dev/migrie/fhl/scratchpad-pane' into dev/migrie/f/sui-p…
zadjii-msft Mar 26, 2024
e05b2bb
Merge branch 'main' into dev/migrie/f/sui-panes
zadjii-msft Mar 29, 2024
a0e014f
Merge remote-tracking branch 'origin/main' into dev/migrie/f/sui-panes
zadjii-msft Apr 3, 2024
a4bc09c
this is better
zadjii-msft Apr 3, 2024
7c4dfff
Merge remote-tracking branch 'origin/main' into dev/migrie/f/sui-panes
zadjii-msft Apr 3, 2024
d311d7b
Merge branch 'dev/migrie/f/sui-panes' into dev/migrie/b/992-sui-follo…
zadjii-msft Apr 3, 2024
7681e2f
yea no that makes sense
zadjii-msft Apr 5, 2024
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
14 changes: 2 additions & 12 deletions src/cascadia/TerminalApp/Pane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1280,21 +1280,11 @@ void Pane::_FocusFirstChild()
}
}

void Pane::UpdateSettings(const CascadiaSettings& settings, const winrt::TerminalApp::TerminalSettingsCache& cache)
void Pane::UpdateSettings(const CascadiaSettings& settings)
{
if (_content)
{
// We need to do a bit more work here for terminal
// panes. They need to know about the profile that was used for
// them, and about the focused/unfocused settings.
if (const auto& terminalPaneContent{ _content.try_as<TerminalPaneContent>() })
{
terminalPaneContent.UpdateTerminalSettings(cache);
}
else
{
_content.UpdateSettings(settings);
}
_content.UpdateSettings(settings);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/Pane.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class Pane : public std::enable_shared_from_this<Pane>
BuildStartupState BuildStartupActions(uint32_t currentId, uint32_t nextId, winrt::TerminalApp::BuildStartupKind kind);
winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs GetTerminalArgsForPane(winrt::TerminalApp::BuildStartupKind kind) const;

void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings, const winrt::TerminalApp::TerminalSettingsCache& cache);
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
bool ResizePane(const winrt::Microsoft::Terminal::Settings::Model::ResizeDirection& direction);
std::shared_ptr<Pane> NavigateDirection(const std::shared_ptr<Pane> sourcePane,
const winrt::Microsoft::Terminal::Settings::Model::FocusDirection& direction,
Expand Down
17 changes: 10 additions & 7 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ namespace winrt::TerminalApp::implementation
_WindowProperties{ std::move(properties) }
{
InitializeComponent();

_WindowProperties.PropertyChanged({ get_weak(), &TerminalPage::_windowPropertyChanged });
}

Expand Down Expand Up @@ -110,7 +109,11 @@ namespace winrt::TerminalApp::implementation
void TerminalPage::SetSettings(CascadiaSettings settings, bool needRefreshUI)
{
assert(Dispatcher().HasThreadAccess());

if (_settings == nullptr)
{
// Create this only on the first time we load the settings.
_terminalSettingsCache = TerminalApp::TerminalSettingsCache{ settings, *_bindings };
}
_settings = settings;

// Make sure to call SetCommands before _RefreshUIForSettingsReload.
Expand Down Expand Up @@ -3104,7 +3107,7 @@ namespace winrt::TerminalApp::implementation
// serialize the actual profile's GUID along with the content guid.
const auto& profile = _settings.GetProfileForArgs(newTerminalArgs);
const auto control = _AttachControlToContent(newTerminalArgs.ContentId());
auto paneContent{ winrt::make<TerminalPaneContent>(profile, control) };
auto paneContent{ winrt::make<TerminalPaneContent>(profile, _terminalSettingsCache, control) };
return std::make_shared<Pane>(paneContent);
}

Expand Down Expand Up @@ -3161,14 +3164,14 @@ namespace winrt::TerminalApp::implementation

const auto control = _CreateNewControlAndContent(controlSettings, connection);

auto paneContent{ winrt::make<TerminalPaneContent>(profile, control) };
auto paneContent{ winrt::make<TerminalPaneContent>(profile, _terminalSettingsCache, control) };
auto resultPane = std::make_shared<Pane>(paneContent);

if (debugConnection) // this will only be set if global debugging is on and tap is active
{
auto newControl = _CreateNewControlAndContent(controlSettings, debugConnection);
// Split (auto) with the debug tap.
auto debugContent{ winrt::make<TerminalPaneContent>(profile, newControl) };
auto debugContent{ winrt::make<TerminalPaneContent>(profile, _terminalSettingsCache, newControl) };
auto debugPane = std::make_shared<Pane>(debugContent);

// Since we're doing this split directly on the pane (instead of going through TerminalTab,
Expand Down Expand Up @@ -3281,14 +3284,14 @@ namespace winrt::TerminalApp::implementation
// updating terminal panes, so that we don't have to build a _new_
// TerminalSettings for every profile we update - we can just look them
// up the previous ones we built.
_terminalSettingsCache = TerminalApp::TerminalSettingsCache{ _settings, *_bindings };
_terminalSettingsCache.Reset(_settings, *_bindings);

for (const auto& tab : _tabs)
{
if (auto terminalTab{ _GetTerminalTabImpl(tab) })
{
// Let the tab know that there are new settings. It's up to each content to decide what to do with them.
terminalTab->UpdateSettings(_settings, _terminalSettingsCache);
terminalTab->UpdateSettings(_settings);

// Update the icon of the tab for the currently focused profile in that tab.
// Only do this for TerminalTabs. Other types of tabs won't have multiple panes
Expand Down
12 changes: 3 additions & 9 deletions src/cascadia/TerminalApp/TerminalPaneContent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ using namespace winrt::Microsoft::Terminal::TerminalConnection;
namespace winrt::TerminalApp::implementation
{
TerminalPaneContent::TerminalPaneContent(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile,
const TerminalApp::TerminalSettingsCache& cache,
const winrt::Microsoft::Terminal::Control::TermControl& control) :
_control{ control },
_cache{ cache },
_profile{ profile }
{
_setupControlEvents();
Expand Down Expand Up @@ -340,15 +342,7 @@ namespace winrt::TerminalApp::implementation

void TerminalPaneContent::UpdateSettings(const CascadiaSettings& /*settings*/)
{
// Do nothing. We'll later be updated manually by
// UpdateTerminalSettings, which we need for profile and
// focused/unfocused settings.
assert(false); // If you hit this, you done goofed.
}

void TerminalPaneContent::UpdateTerminalSettings(const TerminalApp::TerminalSettingsCache& cache)
{
if (const auto& settings{ cache.TryLookup(_profile) })
if (const auto& settings{ _cache.TryLookup(_profile) })
{
_control.UpdateControlSettings(settings.DefaultSettings(), settings.UnfocusedSettings());
}
Expand Down
3 changes: 2 additions & 1 deletion src/cascadia/TerminalApp/TerminalPaneContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace winrt::TerminalApp::implementation
struct TerminalPaneContent : TerminalPaneContentT<TerminalPaneContent>
{
TerminalPaneContent(const winrt::Microsoft::Terminal::Settings::Model::Profile& profile,
const TerminalApp::TerminalSettingsCache& cache,
const winrt::Microsoft::Terminal::Control::TermControl& control);

winrt::Windows::UI::Xaml::FrameworkElement GetRoot();
Expand All @@ -30,7 +31,6 @@ namespace winrt::TerminalApp::implementation
winrt::Microsoft::Terminal::Settings::Model::NewTerminalArgs GetNewTerminalArgs(BuildStartupKind kind) const;

void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
void UpdateTerminalSettings(const TerminalApp::TerminalSettingsCache& cache);

void MarkAsDefterm();

Expand Down Expand Up @@ -64,6 +64,7 @@ namespace winrt::TerminalApp::implementation
winrt::Microsoft::Terminal::Control::TermControl _control{ nullptr };
winrt::Microsoft::Terminal::TerminalConnection::ConnectionState _connectionState{ winrt::Microsoft::Terminal::TerminalConnection::ConnectionState::NotConnected };
winrt::Microsoft::Terminal::Settings::Model::Profile _profile{ nullptr };
TerminalApp::TerminalSettingsCache _cache{ nullptr };
bool _isDefTermSession{ false };

winrt::Windows::Media::Playback::MediaPlayer _bellPlayer{ nullptr };
Expand Down
2 changes: 0 additions & 2 deletions src/cascadia/TerminalApp/TerminalPaneContent.idl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ namespace TerminalApp
{
Microsoft.Terminal.Control.TermControl GetTermControl();

void UpdateTerminalSettings(TerminalSettingsCache cache);

void MarkAsDefterm();

Microsoft.Terminal.Settings.Model.Profile GetProfile();
Expand Down
42 changes: 24 additions & 18 deletions src/cascadia/TerminalApp/TerminalSettingsCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,9 @@ namespace winrt

namespace winrt::TerminalApp::implementation
{
TerminalSettingsCache::TerminalSettingsCache(const MTSM::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings) :
_settings{ settings },
_bindings{ bindings }
TerminalSettingsCache::TerminalSettingsCache(const MTSM::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings)
{
// Mapping by GUID isn't _excellent_ because the defaults profile doesn't have a stable GUID; however,
// when we stabilize its guid this will become fully safe.
const auto profileDefaults{ _settings.ProfileDefaults() };
const auto allProfiles{ _settings.AllProfiles() };

profileGuidSettingsMap.reserve(allProfiles.Size() + 1);

// Include the Defaults profile for consideration
profileGuidSettingsMap.insert_or_assign(profileDefaults.Guid(), std::pair{ profileDefaults, nullptr });
for (const auto& newProfile : allProfiles)
{
// Avoid creating a TerminalSettings right now. They're not totally cheap, and we suspect that users with many
// panes may not be using all of their profiles at the same time. Lazy evaluation is king!
profileGuidSettingsMap.insert_or_assign(newProfile.Guid(), std::pair{ newProfile, nullptr });
}
Reset(settings, bindings);
}

MTSM::TerminalSettingsCreateResult TerminalSettingsCache::TryLookup(const MTSM::Profile& profile)
Expand All @@ -54,4 +38,26 @@ namespace winrt::TerminalApp::implementation

return nullptr;
}

void TerminalSettingsCache::Reset(const MTSM::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings)
{
_settings = settings;
_bindings = bindings;

// Mapping by GUID isn't _excellent_ because the defaults profile doesn't have a stable GUID; however,
// when we stabilize its guid this will become fully safe.
const auto profileDefaults{ _settings.ProfileDefaults() };
const auto allProfiles{ _settings.AllProfiles() };
profileGuidSettingsMap.clear();
profileGuidSettingsMap.reserve(allProfiles.Size() + 1);
Copy link
Member

Choose a reason for hiding this comment

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

don't we need to clear the profileGuidSettingsMap?


// Include the Defaults profile for consideration
profileGuidSettingsMap.insert_or_assign(profileDefaults.Guid(), std::pair{ profileDefaults, nullptr });
for (const auto& newProfile : allProfiles)
{
// Avoid creating a TerminalSettings right now. They're not totally cheap, and we suspect that users with many
// panes may not be using all of their profiles at the same time. Lazy evaluation is king!
profileGuidSettingsMap.insert_or_assign(newProfile.Guid(), std::pair{ newProfile, nullptr });
}
}
}
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/TerminalSettingsCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace winrt::TerminalApp::implementation
public:
TerminalSettingsCache(const Microsoft::Terminal::Settings::Model::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings);
Microsoft::Terminal::Settings::Model::TerminalSettingsCreateResult TryLookup(const Microsoft::Terminal::Settings::Model::Profile& profile);
void Reset(const Microsoft::Terminal::Settings::Model::CascadiaSettings& settings, const TerminalApp::AppKeyBindings& bindings);

private:
Microsoft::Terminal::Settings::Model::CascadiaSettings _settings{ nullptr };
Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalApp/TerminalSettingsCache.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ namespace TerminalApp
{
TerminalSettingsCache(Microsoft.Terminal.Settings.Model.CascadiaSettings settings, AppKeyBindings bindings);
Microsoft.Terminal.Settings.Model.TerminalSettingsCreateResult TryLookup(Microsoft.Terminal.Settings.Model.Profile profile);
void Reset(Microsoft.Terminal.Settings.Model.CascadiaSettings settings, AppKeyBindings bindings);
}
}
8 changes: 4 additions & 4 deletions src/cascadia/TerminalApp/TerminalTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ namespace winrt::TerminalApp::implementation
// of the settings that apply to all tabs.
// Return Value:
// - <none>
void TerminalTab::UpdateSettings(const CascadiaSettings& settings, const TerminalApp::TerminalSettingsCache& cache)
void TerminalTab::UpdateSettings(const CascadiaSettings& settings)
{
ASSERT_UI_THREAD();

Expand All @@ -276,7 +276,7 @@ namespace winrt::TerminalApp::implementation

// Update the settings on all our panes.
_rootPane->WalkTree([&](auto pane) {
pane->UpdateSettings(settings, cache);
pane->UpdateSettings(settings);
return false;
});
}
Expand Down Expand Up @@ -390,7 +390,7 @@ namespace winrt::TerminalApp::implementation
return RS_(L"MultiplePanes");
}
const auto activeContent = GetActiveContent();
return activeContent ? activeContent.Title() : winrt::hstring{ L"" };
return activeContent ? activeContent.Title() : winrt::hstring{};
}

// Method Description:
Expand Down Expand Up @@ -450,7 +450,7 @@ namespace winrt::TerminalApp::implementation
// HORRIBLE
//
// Workaround till we know how we actually want to handle state
// restoring other kinda of panes. If this is a settings tab, just
// restoring other kinds of panes. If this is a settings tab, just
// restore it as a settings tab. Don't bother recreating terminal args
// for every pane.
//
Expand Down
2 changes: 1 addition & 1 deletion src/cascadia/TerminalApp/TerminalTab.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace winrt::TerminalApp::implementation
bool SwapPane(const winrt::Microsoft::Terminal::Settings::Model::FocusDirection& direction);
bool FocusPane(const uint32_t id);

void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings, const TerminalApp::TerminalSettingsCache& cache);
void UpdateSettings(const winrt::Microsoft::Terminal::Settings::Model::CascadiaSettings& settings);
void UpdateTitle();

void Shutdown() override;
Expand Down
Loading