mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Fix behavior of split-pane for existing windows (#19347)
Closes #18815 ## Validation Steps Performed * `wt -w 0 sp` splits the current tab ✅
This commit is contained in:
parent
814f78ed2c
commit
0aee174e68
@ -44,10 +44,6 @@ namespace winrt::TerminalApp::implementation
|
|||||||
{
|
{
|
||||||
_args = { value.begin(), value.end() };
|
_args = { value.begin(), value.end() };
|
||||||
_parseResult = _parsed.ParseArgs(_args);
|
_parseResult = _parsed.ParseArgs(_args);
|
||||||
if (_parseResult == 0)
|
|
||||||
{
|
|
||||||
_parsed.ValidateStartupCommands();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
winrt::com_array<winrt::hstring> CommandlineArgs::Commandline()
|
winrt::com_array<winrt::hstring> CommandlineArgs::Commandline()
|
||||||
|
|||||||
@ -1050,6 +1050,11 @@ namespace winrt::TerminalApp::implementation
|
|||||||
// (or called TerminalWindow::Initialize)
|
// (or called TerminalWindow::Initialize)
|
||||||
if (_appArgs->ExitCode() == 0)
|
if (_appArgs->ExitCode() == 0)
|
||||||
{
|
{
|
||||||
|
// The existing logic (before this commit) strictly relied on
|
||||||
|
// ValidateStartupCommands() only to be called for new windows.
|
||||||
|
// It modifies the actions it stores.
|
||||||
|
parsedArgs.ValidateStartupCommands();
|
||||||
|
|
||||||
// If the size of the arguments list is 1,
|
// If the size of the arguments list is 1,
|
||||||
// then it contains only the executable name and no other arguments.
|
// then it contains only the executable name and no other arguments.
|
||||||
_hasCommandLineArguments = _appArgs->CommandlineRef().size() > 1;
|
_hasCommandLineArguments = _appArgs->CommandlineRef().size() > 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user