@@ -132,62 +132,7 @@ NewTerminalArgs Pane::GetTerminalArgsForPane(const bool asContent) const
132
132
// Leaves are the only things that have controls
133
133
assert (_IsLeaf ());
134
134
135
- // TODO! this should be in the IPaneContent interface
136
- if (const auto & terminalPane{ _getTerminalContent () }; !terminalPane)
137
- {
138
- return nullptr ;
139
- }
140
- auto termControl{ _content.GetRoot ().try_as <TermControl>() };
141
-
142
- NewTerminalArgs args{};
143
- auto controlSettings = termControl.Settings ();
144
-
145
- args.Profile (controlSettings.ProfileName ());
146
- // If we know the user's working directory use it instead of the profile.
147
- if (const auto dir = termControl.WorkingDirectory (); !dir.empty ())
148
- {
149
- args.StartingDirectory (dir);
150
- }
151
- else
152
- {
153
- args.StartingDirectory (controlSettings.StartingDirectory ());
154
- }
155
- args.TabTitle (controlSettings.StartingTitle ());
156
- args.Commandline (controlSettings.Commandline ());
157
- args.SuppressApplicationTitle (controlSettings.SuppressApplicationTitle ());
158
- if (controlSettings.TabColor () || controlSettings.StartingTabColor ())
159
- {
160
- til::color c;
161
- // StartingTabColor is prioritized over other colors
162
- if (const auto color = controlSettings.StartingTabColor ())
163
- {
164
- c = til::color (color.Value ());
165
- }
166
- else
167
- {
168
- c = til::color (controlSettings.TabColor ().Value ());
169
- }
170
-
171
- args.TabColor (winrt::Windows::Foundation::IReference<winrt::Windows::UI::Color>{ static_cast <winrt::Windows::UI::Color>(c) });
172
- }
173
-
174
- // TODO:GH#9800 - we used to be able to persist the color scheme that a
175
- // TermControl was initialized with, by name. With the change to having the
176
- // control own its own copy of its settings, this isn't possible anymore.
177
- //
178
- // We may be able to get around this by storing the Name in the Core::Scheme
179
- // object. That would work for schemes set by the Terminal, but not ones set
180
- // by VT, but that seems good enough.
181
-
182
- // Only fill in the ContentId if absolutely needed. If you fill in a number
183
- // here (even 0), we'll serialize that number, AND treat that action as an
184
- // "attach existing" rather than a "create"
185
- if (asContent)
186
- {
187
- args.ContentId (termControl.ContentId ());
188
- }
189
-
190
- return args;
135
+ return _content.GetNewTerminalArgs (asContent);
191
136
}
192
137
193
138
// Method Description:
0 commit comments