Skip to content

Commit 0aee174

Browse files
authored
Fix behavior of split-pane for existing windows (#19347)
Closes #18815 ## Validation Steps Performed * `wt -w 0 sp` splits the current tab ✅
1 parent 814f78e commit 0aee174

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/cascadia/TerminalApp/Remoting.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ namespace winrt::TerminalApp::implementation
4444
{
4545
_args = { value.begin(), value.end() };
4646
_parseResult = _parsed.ParseArgs(_args);
47-
if (_parseResult == 0)
48-
{
49-
_parsed.ValidateStartupCommands();
50-
}
5147
}
5248

5349
winrt::com_array<winrt::hstring> CommandlineArgs::Commandline()

src/cascadia/TerminalApp/TerminalWindow.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,11 @@ namespace winrt::TerminalApp::implementation
10501050
// (or called TerminalWindow::Initialize)
10511051
if (_appArgs->ExitCode() == 0)
10521052
{
1053+
// The existing logic (before this commit) strictly relied on
1054+
// ValidateStartupCommands() only to be called for new windows.
1055+
// It modifies the actions it stores.
1056+
parsedArgs.ValidateStartupCommands();
1057+
10531058
// If the size of the arguments list is 1,
10541059
// then it contains only the executable name and no other arguments.
10551060
_hasCommandLineArguments = _appArgs->CommandlineRef().size() > 1;

0 commit comments

Comments
 (0)