feat: add Go to Result and Open Result to Side commands for search editor#306567
Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Open
feat: add Go to Result and Open Result to Side commands for search editor#306567yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Conversation
…itor Add two new commands (searchEditor.action.goToResult and searchEditor.action.openResultToSide) that allow navigating to search results from the keyboard, matching the double-click behavior. The existing double-click handler is refactored to share the new openResult helper method. Both commands are available via the Command Palette when a Search Editor is active, and users can assign custom keybindings. Closes microsoft#194044
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Feature — adds two new commands to the Search Editor
What is the current behavior?
In the Search Editor, navigating to a search result can only be done via:
search.searchEditor.doubleClickBehaviour)F12(Go to Definition) /Ctrl+K F12(Open Definition to Side)There are no dedicated Search Editor commands for "go to result" or "open result to the side" that users can discover via the Command Palette or bind to custom keybindings.
Closes #194044
What is the new behavior?
Two new commands are added:
searchEditor.action.goToResult) — navigates to the result at the cursor position in the active editor groupsearchEditor.action.openResultToSide) — opens the result in an editor group to the sideBoth commands:
The existing double-click handler has been refactored to share the same
openResult()helper method, reducing code duplication.Additional context
Implementation follows the approach suggested by @andreamah in the issue comment: abstracting the double-click logic into a reusable method and exposing it as search editor actions.
No default keybindings are assigned to avoid conflicts with the editor's text editing shortcuts — users can configure their preferred bindings (e.g.,
Enter/Cmd+Enter) through the Keyboard Shortcuts editor.