diff --git a/src/cascadia/TerminalApp/CommandPalette.cpp b/src/cascadia/TerminalApp/CommandPalette.cpp index 31ec712b9..03f69625d 100644 --- a/src/cascadia/TerminalApp/CommandPalette.cpp +++ b/src/cascadia/TerminalApp/CommandPalette.cpp @@ -244,6 +244,17 @@ namespace winrt::TerminalApp::implementation _PreviewActionHandlers(*this, actionPaletteItem.Command()); } } + else if (_currentMode == CommandPaletteMode::CommandlineMode) + { + if (filteredCommand) + { + SearchBoxPlaceholderText(filteredCommand.Item().Name()); + } + else + { + SearchBoxPlaceholderText(RS_(L"CmdPalCommandlinePrompt")); + } + } } void CommandPalette::_previewKeyDownHandler(IInspectable const& /*sender*/, @@ -364,6 +375,17 @@ namespace winrt::TerminalApp::implementation _searchBox().PasteFromClipboard(); e.Handled(true); } + else if (key == VirtualKey::Right && _currentMode == CommandPaletteMode::CommandlineMode) + { + if (const auto command{ _filteredActionsView().SelectedItem().try_as() }) + { + _searchBox().Text(command.Item().Name()); + _searchBox().Select(_searchBox().Text().size(), 0); + _searchBox().Focus(FocusState::Programmatic); + _filteredActionsView().SelectedIndex(-1); + e.Handled(true); + } + } } // Method Description: