File tree 6 files changed +11
-25
lines changed
6 files changed +11
-25
lines changed Original file line number Diff line number Diff line change @@ -1081,30 +1081,16 @@ TermControl Pane::GetLastFocusedTerminalControl()
1081
1081
{
1082
1082
if (p->_IsLeaf ())
1083
1083
{
1084
- if (const auto & terminalPane{ p->_content .try_as <TerminalPaneContent>() })
1085
- {
1086
- return terminalPane.GetTerminal ();
1087
- }
1088
- else
1089
- {
1090
- return nullptr ;
1091
- }
1084
+ return p->GetTerminalControl ();
1092
1085
}
1093
1086
pane = p;
1094
1087
}
1095
1088
// We didn't find our child somehow, they might have closed under us.
1096
1089
}
1097
1090
return _firstChild->GetLastFocusedTerminalControl ();
1098
1091
}
1099
-
1100
- if (const auto & terminalPane{ _content.try_as <TerminalPaneContent>() })
1101
- {
1102
- return terminalPane.GetTerminal ();
1103
- }
1104
- else
1105
- {
1106
- return nullptr ;
1107
- }
1092
+ // we _are_ a leaf.
1093
+ return GetTerminalControl ();
1108
1094
}
1109
1095
1110
1096
// Method Description:
@@ -1118,7 +1104,7 @@ TermControl Pane::GetTerminalControl() const
1118
1104
{
1119
1105
if (const auto & terminalPane{ _getTerminalContent () })
1120
1106
{
1121
- return terminalPane.GetTerminal ();
1107
+ return terminalPane.GetTermControl ();
1122
1108
}
1123
1109
else
1124
1110
{
Original file line number Diff line number Diff line change @@ -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 ;
@@ -3219,7 +3219,7 @@ namespace winrt::TerminalApp::implementation
3219
3219
// for nulls
3220
3220
if (const auto & connection{ _duplicateConnectionForRestart (paneContent) })
3221
3221
{
3222
- paneContent.GetTerminal ().Connection (connection);
3222
+ paneContent.GetTermControl ().Connection (connection);
3223
3223
connection.Start ();
3224
3224
}
3225
3225
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ namespace winrt::TerminalApp::implementation
46
46
{
47
47
return _control;
48
48
}
49
- winrt::Microsoft::Terminal::Control::TermControl TerminalPaneContent::GetTerminal ()
49
+ winrt::Microsoft::Terminal::Control::TermControl TerminalPaneContent::GetTermControl ()
50
50
{
51
51
return _control;
52
52
}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ namespace winrt::TerminalApp::implementation
22
22
const winrt::Microsoft::Terminal::Control::TermControl& control);
23
23
24
24
winrt::Windows::UI::Xaml::FrameworkElement GetRoot ();
25
- winrt::Microsoft::Terminal::Control::TermControl GetTerminal ();
25
+ winrt::Microsoft::Terminal::Control::TermControl GetTermControl ();
26
26
winrt::Windows::Foundation::Size MinimumSize ();
27
27
void Focus (winrt::Windows::UI::Xaml::FocusState reason = winrt::Windows::UI::Xaml::FocusState::Programmatic);
28
28
void Close ();
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ namespace TerminalApp
7
7
{
8
8
[default_interface] runtimeclass TerminalPaneContent : IPaneContent, ISnappable
9
9
{
10
- Microsoft.Terminal.Control.TermControl GetTerminal ();
10
+ Microsoft.Terminal.Control.TermControl GetTermControl ();
11
11
12
12
void UpdateSettings(const Microsoft.Terminal.Settings.Model.TerminalSettingsCreateResult settings,
13
13
const Microsoft.Terminal.Settings.Model.Profile profile);
Original file line number Diff line number Diff line change @@ -1040,7 +1040,7 @@ namespace winrt::TerminalApp::implementation
1040
1040
{
1041
1041
if (const auto & termContent{ content.try_as <TerminalApp::TerminalPaneContent>() })
1042
1042
{
1043
- _addBroadcastHandlers (termContent.GetTerminal (), events);
1043
+ _addBroadcastHandlers (termContent.GetTermControl (), events);
1044
1044
}
1045
1045
}
1046
1046
@@ -1722,7 +1722,7 @@ namespace winrt::TerminalApp::implementation
1722
1722
{
1723
1723
if (const auto termContent{ content.try_as <winrt::TerminalApp::TerminalPaneContent>() })
1724
1724
{
1725
- return termContent.GetTerminal ();
1725
+ return termContent.GetTermControl ();
1726
1726
}
1727
1727
}
1728
1728
return nullptr ;
You can’t perform that action at this time.
0 commit comments