Preview the selected tab in tabSearch too (#20256)

Currently when you use the cmdpal in tabswitcher mode, we "preview"
switching to that tab. We don't do that for `tabSearch` mode though.

Fixing that was half a line of code. Now we do.

Closes #20233
This commit is contained in:
Mike Griese
2026-05-21 19:28:02 -05:00
committed by GitHub
parent a8a5c88111
commit 458872a01a

View File

@@ -224,7 +224,7 @@ namespace winrt::TerminalApp::implementation
{
const auto selectedCommand = _filteredActionsView().SelectedItem();
const auto filteredCommand{ selectedCommand.try_as<winrt::TerminalApp::FilteredCommand>() };
if (_currentMode == CommandPaletteMode::TabSwitchMode)
if (_currentMode == CommandPaletteMode::TabSwitchMode || _currentMode == CommandPaletteMode::TabSearchMode)
{
_switchToTab(filteredCommand);
}