Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zadjii-msft committed Jul 14, 2022
1 parent 1f2bb76 commit aaefdf4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2731,6 +2731,11 @@ namespace winrt::TerminalApp::implementation
{
PreparedContent preppedContent;
_evaluateSettings(newTerminalArgs, duplicate, preppedContent.controlSettings, preppedContent.profile);

// If the NewTerminalArgs had a content guid in there, then we don't
// have to start a new one. _AttachToContentProcess will give us an
// "Async" callback that will actually just immediately connect to the
// given content proc
preppedContent.initContentProc = (newTerminalArgs && newTerminalArgs.ContentGuid() != winrt::guid{}) ?
_AttachToContentProcess(newTerminalArgs.ContentGuid()) :
_CreateNewContentProcess(preppedContent.profile, preppedContent.controlSettings);
Expand Down
4 changes: 4 additions & 0 deletions src/cascadia/TerminalSettingsModel/ActionArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,10 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
JsonUtils::SetValueForKey(json, SuppressApplicationTitleKey, args->_SuppressApplicationTitle);
JsonUtils::SetValueForKey(json, ColorSchemeKey, args->_ColorScheme);
JsonUtils::SetValueForKey(json, ElevateKey, args->_Elevate);

// TODO! We should probably have the ContentGuid be optional, or at
// least serialized smarter, so we definitely don't write it to the
// file, ever.
JsonUtils::SetValueForKey(json, ContentKey, args->_ContentGuid);
return json;
}
Expand Down

0 comments on commit aaefdf4

Please sign in to comment.