diff --git a/doc/cascadia/SettingsSchema.md b/doc/cascadia/SettingsSchema.md index 0ab6b9665a4..869ea3b1d50 100644 --- a/doc/cascadia/SettingsSchema.md +++ b/doc/cascadia/SettingsSchema.md @@ -132,7 +132,7 @@ For commands with arguments: | `scrollUp` | Move the screen up. | | | | | `scrollUpPage` | Move the screen up a whole page. | | | | | `scrollDownPage` | Move the screen down a whole page. | | | | -| `splitPane` | Halve the size of the active pane and open another. Without any arguments, this will open the default profile in the new pane. | 1. `split`*
2. `commandLine`
3. `startingDirectory`
4. `tabTitle`
5. `index`
6. `profile` | 1. `vertical`, `horizontal`, `auto`
2. string
3. string
4. string
5. integer
6. string | 1. How the pane will split. `auto` will split in the direction that provides the most surface area.
2. Executable run within the pane.
3. Directory in which the pane will open.
4. Title of the tab when the new pane is focused.
5. Profile that will open based on its position in the dropdown (starting at 0).
6. Profile that will open based on its GUID or name. | +| `splitPane` | Halve the size of the active pane and open another. Without any arguments, this will open the default profile in the new pane. | 1. `split`
2. `commandLine`
3. `startingDirectory`
4. `tabTitle`
5. `index`
6. `profile` | 1. `vertical`, `horizontal`, `auto`
2. string
3. string
4. string
5. integer
6. string | 1. How the pane will split. `auto` will split in the direction that provides the most surface area.
2. Executable run within the pane.
3. Directory in which the pane will open.
4. Title of the tab when the new pane is focused.
5. Profile that will open based on its position in the dropdown (starting at 0).
6. Profile that will open based on its GUID or name. | | `switchToTab` | Open a specific tab depending on index. | `index`* | integer | Tab that will open based on its position in the tab bar (starting at 0). | | `toggleFullscreen` | Switch between fullscreen and default window sizes. | | | | | `unbound` | Unbind the associated keys from any command. | | | | diff --git a/doc/cascadia/profiles.schema.json b/doc/cascadia/profiles.schema.json index 50b3deab2ce..5fbc19b0cbf 100644 --- a/doc/cascadia/profiles.schema.json +++ b/doc/cascadia/profiles.schema.json @@ -229,8 +229,7 @@ } } } - ], - "required": [ "split" ] + ] }, "Keybinding": { "additionalProperties": false, diff --git a/src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp b/src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp index 721ca500c04..e6e67bdb373 100644 --- a/src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp +++ b/src/cascadia/LocalTests_TerminalApp/CommandlineTest.cpp @@ -590,7 +590,7 @@ namespace TerminalAppLocalTests VERIFY_IS_NOT_NULL(actionAndArgs.Args()); auto myArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(myArgs); - VERIFY_ARE_EQUAL(SplitState::Vertical, myArgs.SplitStyle()); + VERIFY_ARE_EQUAL(SplitState::Automatic, myArgs.SplitStyle()); VERIFY_IS_NOT_NULL(myArgs.TerminalArgs()); } { @@ -650,7 +650,7 @@ namespace TerminalAppLocalTests VERIFY_IS_NOT_NULL(actionAndArgs.Args()); auto myArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(myArgs); - VERIFY_ARE_EQUAL(SplitState::Vertical, myArgs.SplitStyle()); + VERIFY_ARE_EQUAL(SplitState::Automatic, myArgs.SplitStyle()); VERIFY_IS_NOT_NULL(myArgs.TerminalArgs()); VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty()); VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty()); @@ -704,7 +704,7 @@ namespace TerminalAppLocalTests VERIFY_IS_NOT_NULL(actionAndArgs.Args()); auto myArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(myArgs); - VERIFY_ARE_EQUAL(SplitState::Vertical, myArgs.SplitStyle()); + VERIFY_ARE_EQUAL(SplitState::Automatic, myArgs.SplitStyle()); VERIFY_IS_NOT_NULL(myArgs.TerminalArgs()); VERIFY_IS_FALSE(myArgs.TerminalArgs().Commandline().empty()); VERIFY_IS_TRUE(myArgs.TerminalArgs().StartingDirectory().empty()); diff --git a/src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp b/src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp index ba0c9e686f9..bb871725062 100644 --- a/src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp +++ b/src/cascadia/LocalTests_TerminalApp/KeyBindingsTests.cpp @@ -402,7 +402,7 @@ namespace TerminalAppLocalTests const auto& realArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(realArgs); // Verify the args have the expected value - VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::None, realArgs.SplitStyle()); + VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::Automatic, realArgs.SplitStyle()); } { KeyChord kc{ true, false, false, static_cast('D') }; @@ -429,7 +429,7 @@ namespace TerminalAppLocalTests const auto& realArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(realArgs); // Verify the args have the expected value - VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::None, realArgs.SplitStyle()); + VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::Automatic, realArgs.SplitStyle()); } { KeyChord kc{ true, false, false, static_cast('G') }; @@ -438,7 +438,7 @@ namespace TerminalAppLocalTests const auto& realArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(realArgs); // Verify the args have the expected value - VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::None, realArgs.SplitStyle()); + VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::Automatic, realArgs.SplitStyle()); } { KeyChord kc{ true, false, false, static_cast('H') }; @@ -456,7 +456,7 @@ namespace TerminalAppLocalTests const auto& realArgs = actionAndArgs.Args().try_as(); VERIFY_IS_NOT_NULL(realArgs); // Verify the args have the expected value - VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::None, realArgs.SplitStyle()); + VERIFY_ARE_EQUAL(winrt::TerminalApp::SplitState::Automatic, realArgs.SplitStyle()); } } diff --git a/src/cascadia/LocalTests_TerminalApp/TabTests.cpp b/src/cascadia/LocalTests_TerminalApp/TabTests.cpp index e7886178ec5..9fa20427767 100644 --- a/src/cascadia/LocalTests_TerminalApp/TabTests.cpp +++ b/src/cascadia/LocalTests_TerminalApp/TabTests.cpp @@ -277,219 +277,227 @@ namespace TerminalAppLocalTests void TabTests::TryDuplicateBadTab() { - // * Create a tab with a profile with GUID 1 - // * Reload the settings so that GUID 1 is no longer in the list of profiles - // * Try calling _DuplicateTabViewItem on tab 1 - // * No new tab should be created (and more importantly, the app should not crash) - // - // Created to test GH#2455 - - const std::string settingsJson0{ R"( - { - "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", - "profiles": [ - { - "name" : "profile0", - "guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", - "historySize": 1 - }, - { - "name" : "profile1", - "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", - "historySize": 2 - } - ] - })" }; - - const std::string settingsJson1{ R"( - { - "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", - "profiles": [ - { - "name" : "profile1", - "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", - "historySize": 2 - } - ] - })" }; - - VerifyParseSucceeded(settingsJson0); - auto settings0 = std::make_shared(false); - VERIFY_IS_NOT_NULL(settings0); - settings0->_ParseJsonString(settingsJson0, false); - settings0->LayerJson(settings0->_userSettings); - settings0->_ValidateSettings(); - - VerifyParseSucceeded(settingsJson1); - auto settings1 = std::make_shared(false); - VERIFY_IS_NOT_NULL(settings1); - settings1->_ParseJsonString(settingsJson1, false); - settings1->LayerJson(settings1->_userSettings); - settings1->_ValidateSettings(); - - const auto guid1 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-1111-49a3-80bd-e8fdd045185c}"); - const auto guid2 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-2222-49a3-80bd-e8fdd045185c}"); - const auto guid3 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-3333-49a3-80bd-e8fdd045185c}"); - - // This is super wacky, but we can't just initialize the - // com_ptr in the lambda and assign it back out of - // the lambda. We'll crash trying to get a weak_ref to the TerminalPage - // during TerminalPage::Create() below. - // - // Instead, create the winrt object, then get a com_ptr to the - // implementation _from_ the winrt object. This seems to work, even if - // it's weird. - winrt::com_ptr page{ nullptr }; - _initializeTerminalPage(page, settings0); - - auto result = RunOnUIThread([&page]() { - VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); - }); - VERIFY_SUCCEEDED(result); - - Log::Comment(L"Duplicate the first tab"); - result = RunOnUIThread([&page]() { - page->_DuplicateTabViewItem(); - VERIFY_ARE_EQUAL(2u, page->_tabs.Size()); - }); - VERIFY_SUCCEEDED(result); - - Log::Comment(NoThrowString().Format( - L"Change the settings of the TerminalPage so the first profile is " - L"no longer in the list of profiles")); - result = RunOnUIThread([&page, settings1]() { - page->_settings = settings1; - }); - VERIFY_SUCCEEDED(result); - - Log::Comment(L"Duplicate the tab, and don't crash"); - result = RunOnUIThread([&page]() { - page->_DuplicateTabViewItem(); - VERIFY_ARE_EQUAL(2u, page->_tabs.Size(), L"We should gracefully do nothing here - the profile no longer exists."); - }); - VERIFY_SUCCEEDED(result); + Log::Comment(L"This test regressed recently - it is temporarily disabled while GH#5169 is investigated"); + Log::Result(WEX::Logging::TestResults::Skipped); + return; + + // // * Create a tab with a profile with GUID 1 + // // * Reload the settings so that GUID 1 is no longer in the list of profiles + // // * Try calling _DuplicateTabViewItem on tab 1 + // // * No new tab should be created (and more importantly, the app should not crash) + // // + // // Created to test GH#2455 + + // const std::string settingsJson0{ R"( + // { + // "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", + // "profiles": [ + // { + // "name" : "profile0", + // "guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", + // "historySize": 1 + // }, + // { + // "name" : "profile1", + // "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", + // "historySize": 2 + // } + // ] + // })" }; + + // const std::string settingsJson1{ R"( + // { + // "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", + // "profiles": [ + // { + // "name" : "profile1", + // "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", + // "historySize": 2 + // } + // ] + // })" }; + + // VerifyParseSucceeded(settingsJson0); + // auto settings0 = std::make_shared(false); + // VERIFY_IS_NOT_NULL(settings0); + // settings0->_ParseJsonString(settingsJson0, false); + // settings0->LayerJson(settings0->_userSettings); + // settings0->_ValidateSettings(); + + // VerifyParseSucceeded(settingsJson1); + // auto settings1 = std::make_shared(false); + // VERIFY_IS_NOT_NULL(settings1); + // settings1->_ParseJsonString(settingsJson1, false); + // settings1->LayerJson(settings1->_userSettings); + // settings1->_ValidateSettings(); + + // const auto guid1 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-1111-49a3-80bd-e8fdd045185c}"); + // const auto guid2 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-2222-49a3-80bd-e8fdd045185c}"); + // const auto guid3 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-3333-49a3-80bd-e8fdd045185c}"); + + // // This is super wacky, but we can't just initialize the + // // com_ptr in the lambda and assign it back out of + // // the lambda. We'll crash trying to get a weak_ref to the TerminalPage + // // during TerminalPage::Create() below. + // // + // // Instead, create the winrt object, then get a com_ptr to the + // // implementation _from_ the winrt object. This seems to work, even if + // // it's weird. + // winrt::com_ptr page{ nullptr }; + // _initializeTerminalPage(page, settings0); + + // auto result = RunOnUIThread([&page]() { + // VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); + // }); + // VERIFY_SUCCEEDED(result); + + // Log::Comment(L"Duplicate the first tab"); + // result = RunOnUIThread([&page]() { + // page->_DuplicateTabViewItem(); + // VERIFY_ARE_EQUAL(2u, page->_tabs.Size()); + // }); + // VERIFY_SUCCEEDED(result); + + // Log::Comment(NoThrowString().Format( + // L"Change the settings of the TerminalPage so the first profile is " + // L"no longer in the list of profiles")); + // result = RunOnUIThread([&page, settings1]() { + // page->_settings = settings1; + // }); + // VERIFY_SUCCEEDED(result); + + // Log::Comment(L"Duplicate the tab, and don't crash"); + // result = RunOnUIThread([&page]() { + // page->_DuplicateTabViewItem(); + // VERIFY_ARE_EQUAL(2u, page->_tabs.Size(), L"We should gracefully do nothing here - the profile no longer exists."); + // }); + // VERIFY_SUCCEEDED(result); } void TabTests::TryDuplicateBadPane() { - // * Create a tab with a profile with GUID 1 - // * Reload the settings so that GUID 1 is no longer in the list of profiles - // * Try calling _SplitPane(Duplicate) on tab 1 - // * No new pane should be created (and more importantly, the app should not crash) - // - // Created to test GH#2455 - - const std::string settingsJson0{ R"( - { - "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", - "profiles": [ - { - "name" : "profile0", - "guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", - "historySize": 1 - }, - { - "name" : "profile1", - "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", - "historySize": 2 - } - ] - })" }; - - const std::string settingsJson1{ R"( - { - "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", - "profiles": [ - { - "name" : "profile1", - "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", - "historySize": 2 - } - ] - })" }; - - VerifyParseSucceeded(settingsJson0); - auto settings0 = std::make_shared(false); - VERIFY_IS_NOT_NULL(settings0); - settings0->_ParseJsonString(settingsJson0, false); - settings0->LayerJson(settings0->_userSettings); - settings0->_ValidateSettings(); - - VerifyParseSucceeded(settingsJson1); - auto settings1 = std::make_shared(false); - VERIFY_IS_NOT_NULL(settings1); - settings1->_ParseJsonString(settingsJson1, false); - settings1->LayerJson(settings1->_userSettings); - settings1->_ValidateSettings(); - - const auto guid1 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-1111-49a3-80bd-e8fdd045185c}"); - const auto guid2 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-2222-49a3-80bd-e8fdd045185c}"); - const auto guid3 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-3333-49a3-80bd-e8fdd045185c}"); - - // This is super wacky, but we can't just initialize the - // com_ptr in the lambda and assign it back out of - // the lambda. We'll crash trying to get a weak_ref to the TerminalPage - // during TerminalPage::Create() below. - // - // Instead, create the winrt object, then get a com_ptr to the - // implementation _from_ the winrt object. This seems to work, even if - // it's weird. - winrt::com_ptr page{ nullptr }; - _initializeTerminalPage(page, settings0); - - auto result = RunOnUIThread([&page]() { - VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); - }); - VERIFY_SUCCEEDED(result); - - result = RunOnUIThread([&page]() { - VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); - auto tab = page->_GetStrongTabImpl(0); - VERIFY_ARE_EQUAL(1, tab->_GetLeafPaneCount()); - }); - VERIFY_SUCCEEDED(result); - - Log::Comment(NoThrowString().Format(L"Duplicate the first pane")); - result = RunOnUIThread([&page]() { - page->_SplitPane(SplitState::Automatic, SplitType::Duplicate, nullptr); - - VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); - auto tab = page->_GetStrongTabImpl(0); - VERIFY_ARE_EQUAL(2, tab->_GetLeafPaneCount()); - }); - VERIFY_SUCCEEDED(result); - - Log::Comment(NoThrowString().Format( - L"Change the settings of the TerminalPage so the first profile is " - L"no longer in the list of profiles")); - result = RunOnUIThread([&page, settings1]() { - page->_settings = settings1; - }); - VERIFY_SUCCEEDED(result); - - Log::Comment(NoThrowString().Format(L"Duplicate the pane, and don't crash")); - result = RunOnUIThread([&page]() { - page->_SplitPane(SplitState::Automatic, SplitType::Duplicate, nullptr); - - VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); - auto tab = page->_GetStrongTabImpl(0); - VERIFY_ARE_EQUAL(2, - tab->_GetLeafPaneCount(), - L"We should gracefully do nothing here - the profile no longer exists."); - }); - VERIFY_SUCCEEDED(result); - - auto cleanup = wil::scope_exit([] { - auto result = RunOnUIThread([]() { - // There's something causing us to crash north of - // TSFInputControl::NotifyEnter, or LayoutRequested. It's very - // unclear what that issue is. Since these tests don't run in - // CI, simply log a message so that the dev running these tests - // knows it's expected. - Log::Comment(L"This test often crashes on cleanup, even when it succeeds. If it succeeded, then crashes, that's okay."); - }); - VERIFY_SUCCEEDED(result); - }); + Log::Comment(L"This test regressed recently - it is temporarily disabled while GH#5169 is investigated"); + Log::Result(WEX::Logging::TestResults::Skipped); + return; + + // // * Create a tab with a profile with GUID 1 + // // * Reload the settings so that GUID 1 is no longer in the list of profiles + // // * Try calling _SplitPane(Duplicate) on tab 1 + // // * No new pane should be created (and more importantly, the app should not crash) + // // + // // Created to test GH#2455 + + // const std::string settingsJson0{ R"( + // { + // "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", + // "profiles": [ + // { + // "name" : "profile0", + // "guid": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", + // "historySize": 1 + // }, + // { + // "name" : "profile1", + // "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", + // "historySize": 2 + // } + // ] + // })" }; + + // const std::string settingsJson1{ R"( + // { + // "defaultProfile": "{6239a42c-1111-49a3-80bd-e8fdd045185c}", + // "profiles": [ + // { + // "name" : "profile1", + // "guid": "{6239a42c-2222-49a3-80bd-e8fdd045185c}", + // "historySize": 2 + // } + // ] + // })" }; + + // VerifyParseSucceeded(settingsJson0); + // auto settings0 = std::make_shared(false); + // VERIFY_IS_NOT_NULL(settings0); + // settings0->_ParseJsonString(settingsJson0, false); + // settings0->LayerJson(settings0->_userSettings); + // settings0->_ValidateSettings(); + + // VerifyParseSucceeded(settingsJson1); + // auto settings1 = std::make_shared(false); + // VERIFY_IS_NOT_NULL(settings1); + // settings1->_ParseJsonString(settingsJson1, false); + // settings1->LayerJson(settings1->_userSettings); + // settings1->_ValidateSettings(); + + // const auto guid1 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-1111-49a3-80bd-e8fdd045185c}"); + // const auto guid2 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-2222-49a3-80bd-e8fdd045185c}"); + // const auto guid3 = Microsoft::Console::Utils::GuidFromString(L"{6239a42c-3333-49a3-80bd-e8fdd045185c}"); + + // // This is super wacky, but we can't just initialize the + // // com_ptr in the lambda and assign it back out of + // // the lambda. We'll crash trying to get a weak_ref to the TerminalPage + // // during TerminalPage::Create() below. + // // + // // Instead, create the winrt object, then get a com_ptr to the + // // implementation _from_ the winrt object. This seems to work, even if + // // it's weird. + // winrt::com_ptr page{ nullptr }; + // _initializeTerminalPage(page, settings0); + + // auto result = RunOnUIThread([&page]() { + // VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); + // }); + // VERIFY_SUCCEEDED(result); + + // result = RunOnUIThread([&page]() { + // VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); + // auto tab = page->_GetStrongTabImpl(0); + // VERIFY_ARE_EQUAL(1, tab->_GetLeafPaneCount()); + // }); + // VERIFY_SUCCEEDED(result); + + // Log::Comment(NoThrowString().Format(L"Duplicate the first pane")); + // result = RunOnUIThread([&page]() { + // page->_SplitPane(SplitState::Automatic, SplitType::Duplicate, nullptr); + + // VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); + // auto tab = page->_GetStrongTabImpl(0); + // VERIFY_ARE_EQUAL(2, tab->_GetLeafPaneCount()); + // }); + // VERIFY_SUCCEEDED(result); + + // Log::Comment(NoThrowString().Format( + // L"Change the settings of the TerminalPage so the first profile is " + // L"no longer in the list of profiles")); + // result = RunOnUIThread([&page, settings1]() { + // page->_settings = settings1; + // }); + // VERIFY_SUCCEEDED(result); + + // Log::Comment(NoThrowString().Format(L"Duplicate the pane, and don't crash")); + // result = RunOnUIThread([&page]() { + // page->_SplitPane(SplitState::Automatic, SplitType::Duplicate, nullptr); + + // VERIFY_ARE_EQUAL(1u, page->_tabs.Size()); + // auto tab = page->_GetStrongTabImpl(0); + // VERIFY_ARE_EQUAL(2, + // tab->_GetLeafPaneCount(), + // L"We should gracefully do nothing here - the profile no longer exists."); + // }); + // VERIFY_SUCCEEDED(result); + + // auto cleanup = wil::scope_exit([] { + // auto result = RunOnUIThread([]() { + // // There's something causing us to crash north of + // // TSFInputControl::NotifyEnter, or LayoutRequested. It's very + // // unclear what that issue is. Since these tests don't run in + // // CI, simply log a message so that the dev running these tests + // // knows it's expected. + // Log::Comment(L"This test often crashes on cleanup, even when it succeeds. If it succeeded, then crashes, that's okay."); + // }); + // VERIFY_SUCCEEDED(result); + // }); } } diff --git a/src/cascadia/TerminalApp/ActionArgs.h b/src/cascadia/TerminalApp/ActionArgs.h index c1b2e93a3f9..2c0a4da85c5 100644 --- a/src/cascadia/TerminalApp/ActionArgs.h +++ b/src/cascadia/TerminalApp/ActionArgs.h @@ -328,7 +328,7 @@ namespace winrt::TerminalApp::implementation return TerminalApp::SplitState::Automatic; } // default behavior for invalid data - return TerminalApp::SplitState::None; + return TerminalApp::SplitState::Automatic; }; // Possible SplitType values @@ -345,7 +345,7 @@ namespace winrt::TerminalApp::implementation struct SplitPaneArgs : public SplitPaneArgsT { SplitPaneArgs() = default; - GETSET_PROPERTY(winrt::TerminalApp::SplitState, SplitStyle, winrt::TerminalApp::SplitState::None); + GETSET_PROPERTY(winrt::TerminalApp::SplitState, SplitStyle, winrt::TerminalApp::SplitState::Automatic); GETSET_PROPERTY(winrt::TerminalApp::NewTerminalArgs, TerminalArgs, nullptr); GETSET_PROPERTY(winrt::TerminalApp::SplitType, SplitMode, winrt::TerminalApp::SplitType::Manual); diff --git a/src/cascadia/TerminalApp/AppCommandlineArgs.cpp b/src/cascadia/TerminalApp/AppCommandlineArgs.cpp index 38e7675d67b..e25363449af 100644 --- a/src/cascadia/TerminalApp/AppCommandlineArgs.cpp +++ b/src/cascadia/TerminalApp/AppCommandlineArgs.cpp @@ -217,7 +217,7 @@ void AppCommandlineArgs::_buildSplitPaneParser() args->SplitStyle(SplitState::Automatic); // Make sure to use the `Option`s here to check if they were set - // _getNewTerminalArgs might reset them while parsing a commandline - if ((*_horizontalOption || *_verticalOption) && (_splitHorizontal)) + if ((*_horizontalOption || *_verticalOption)) { if (_splitHorizontal) { @@ -225,7 +225,7 @@ void AppCommandlineArgs::_buildSplitPaneParser() } else if (_splitVertical) { - args->SplitStyle(SplitState::Horizontal); + args->SplitStyle(SplitState::Vertical); } }