mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
During session save, use the profile's GUID rather than its Name (#19113)
This will prevent Terminal from erroneously selecting a hidden (deleted, disabled or otherwise) profile of the same name during restoration and subsequently using the wrong settings. I am not certain why we used the name at all! Closes #19105
This commit is contained in:
parent
02f173d504
commit
c4fbb58f69
@ -95,7 +95,7 @@ namespace winrt::TerminalApp::implementation
|
|||||||
NewTerminalArgs args{};
|
NewTerminalArgs args{};
|
||||||
const auto& controlSettings = _control.Settings();
|
const auto& controlSettings = _control.Settings();
|
||||||
|
|
||||||
args.Profile(controlSettings.ProfileName());
|
args.Profile(::Microsoft::Console::Utils::GuidToString(_profile.Guid()));
|
||||||
// If we know the user's working directory use it instead of the profile.
|
// If we know the user's working directory use it instead of the profile.
|
||||||
if (const auto dir = _control.WorkingDirectory(); !dir.empty())
|
if (const auto dir = _control.WorkingDirectory(); !dir.empty())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user