@@ -1306,7 +1306,7 @@ namespace winrt::TerminalApp::implementation
1306
1306
return nullptr ;
1307
1307
}
1308
1308
1309
- const auto & control{ paneContent.GetTerminal () };
1309
+ const auto & control{ paneContent.GetTermControl () };
1310
1310
if (control == nullptr )
1311
1311
{
1312
1312
return nullptr ;
@@ -1731,11 +1731,8 @@ namespace winrt::TerminalApp::implementation
1731
1731
// Add an event handler for when the terminal or tab wants to set a
1732
1732
// progress indicator on the taskbar
1733
1733
hostingTab.TaskbarProgressChanged ({ get_weak (), &TerminalPage::_SetTaskbarProgressHandler });
1734
- }
1735
1734
1736
- void TerminalPage::_RegisterPaneEvents (const TerminalApp::TerminalPaneContent& paneContent)
1737
- {
1738
- paneContent.RestartTerminalRequested ({ get_weak (), &TerminalPage::_restartPaneConnection });
1735
+ hostingTab.RestartTerminalRequested ({ get_weak (), &TerminalPage::_restartPaneConnection });
1739
1736
}
1740
1737
1741
1738
// Method Description:
@@ -2390,16 +2387,6 @@ namespace winrt::TerminalApp::implementation
2390
2387
_UnZoomIfNeeded ();
2391
2388
auto [original, _] = activeTab->SplitPane (*realSplitType, splitSize, newPane);
2392
2389
2393
- // When we split the pane, the Pane itself will create a _new_ Pane
2394
- // instance for the original content. We need to make sure we also
2395
- // re-add our event handler to that newly created pane.
2396
- //
2397
- // _MakePane will already call this for the newly created pane.
2398
- if (const auto & paneContent{ original->GetContent ().try_as <TerminalPaneContent>() })
2399
- {
2400
- _RegisterPaneEvents (*paneContent);
2401
- }
2402
-
2403
2390
// After GH#6586, the control will no longer focus itself
2404
2391
// automatically when it's finished being laid out. Manually focus
2405
2392
// the control here instead.
@@ -3131,8 +3118,8 @@ namespace winrt::TerminalApp::implementation
3131
3118
// serialize the actual profile's GUID along with the content guid.
3132
3119
const auto & profile = _settings.GetProfileForArgs (newTerminalArgs);
3133
3120
const auto control = _AttachControlToContent (newTerminalArgs.ContentId ());
3134
- auto terminalPane { winrt::make<TerminalPaneContent>(profile, control) };
3135
- return std::make_shared<Pane>(terminalPane );
3121
+ auto paneContent { winrt::make<TerminalPaneContent>(profile, control) };
3122
+ return std::make_shared<Pane>(paneContent );
3136
3123
}
3137
3124
3138
3125
TerminalSettingsCreateResult controlSettings{ nullptr };
@@ -3188,15 +3175,15 @@ namespace winrt::TerminalApp::implementation
3188
3175
3189
3176
const auto control = _CreateNewControlAndContent (controlSettings, connection);
3190
3177
3191
- auto terminalPane { winrt::make<TerminalPaneContent>(profile, control) };
3192
- auto resultPane = std::make_shared<Pane>(terminalPane );
3178
+ auto paneContent { winrt::make<TerminalPaneContent>(profile, control) };
3179
+ auto resultPane = std::make_shared<Pane>(paneContent );
3193
3180
3194
3181
if (debugConnection) // this will only be set if global debugging is on and tap is active
3195
3182
{
3196
3183
auto newControl = _CreateNewControlAndContent (controlSettings, debugConnection);
3197
3184
// Split (auto) with the debug tap.
3198
- auto debugTerminalPane { winrt::make<TerminalPaneContent>(profile, newControl) };
3199
- auto debugPane = std::make_shared<Pane>(debugTerminalPane );
3185
+ auto debugContent { winrt::make<TerminalPaneContent>(profile, newControl) };
3186
+ auto debugPane = std::make_shared<Pane>(debugContent );
3200
3187
3201
3188
// Since we're doing this split directly on the pane (instead of going through TerminalTab,
3202
3189
// we need to handle the panes 'active' states
@@ -3210,8 +3197,6 @@ namespace winrt::TerminalApp::implementation
3210
3197
original->SetActive ();
3211
3198
}
3212
3199
3213
- _RegisterPaneEvents (terminalPane);
3214
-
3215
3200
return resultPane;
3216
3201
}
3217
3202
@@ -3225,7 +3210,7 @@ namespace winrt::TerminalApp::implementation
3225
3210
// for nulls
3226
3211
if (const auto & connection{ _duplicateConnectionForRestart (paneContent) })
3227
3212
{
3228
- paneContent.GetTerminal ().Connection (connection);
3213
+ paneContent.GetTermControl ().Connection (connection);
3229
3214
connection.Start ();
3230
3215
}
3231
3216
}
0 commit comments