Skip to content

Commit e1a1b80

Browse files
committed
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 (cherry picked from commit c4fbb58) Service-Card-Id: PVTI_lADOAF3p4s4AmhmQzgcbMe4 Service-Version: 1.22
1 parent 0512af5 commit e1a1b80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cascadia/TerminalApp/TerminalPaneContent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace winrt::TerminalApp::implementation
9595
NewTerminalArgs args{};
9696
const auto& controlSettings = _control.Settings();
9797

98-
args.Profile(controlSettings.ProfileName());
98+
args.Profile(::Microsoft::Console::Utils::GuidToString(_profile.Guid()));
9999
// If we know the user's working directory use it instead of the profile.
100100
if (const auto dir = _control.WorkingDirectory(); !dir.empty())
101101
{

0 commit comments

Comments
 (0)