This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Added "Open in New Tab" and "Open in New Window" right-click context menu options #932
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.
Requirements
Description of the Change
Added two context-menu options to right clicking on the paths of search results, "Open in New Tab"
and "Open in New Window".Can also open new tabs on specific line matches, and already opened tabs will becomes focused after subsequent open attempts:
Note: Open in New Window not implemented for specific line matches as this does not appear to be easily accomplished within the current API.Includes tests to guarantee that the context menu commands call the
correct functions with the intended parameters, as well as ensure that
right-clicks have no unexpected consequences with the new functionality (such as
expanding and contracting of selected results). But it should be noted that I'm still familiarizing myself with the API and tests, so it's possible that the tests may not be entirely accurate due to that lack of familiarity.
Alternate Designs
None.
Benefits
Ability to open multiple results from directory searches without being required to navigate back to search results view. Allows for some nice
window andtab organization and facilitates workflows that involve opening and editing multiple files matching certain search criteria.Possible Drawbacks
People who frequently use "Copy" and "Copy Path" might accidentally click on the newly added menu options.
Applicable Issues
N/A. This was just a feature I'd wanted myself in the past, ideally others find it useful.