This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Make 'Split <direction>' context menu option work with directories #1190
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.
Description of the Change
Currently, right clicking and selecting
Split <direction>
only works for single files; selectingSplit <direction>
on directories opens an empty pane, as explained in atom/atom#14201.This PR makes the
Split <direction>
option open the contents of a directory in separate tabs within a single split pane instead. It does so by overriding the already existing context menu optionsSplit <direction>
(inherited from atom base), making it launch tree-view-specific commands.Benefits
The context menu items will get a
Split
functionality for directories that makes sense, without adding any new items to the menu.The implemented functionality can be useful in many scenarios. Example use case: opening all tests in a directory in the same right pane at once.
Possible Drawbacks
There is currently no warning when opening a directory containing many items.
Applicable Issues
Fixes #1189
Fixes atom/atom#14201 (for tree-view only)