This repository was archived by the owner on Dec 15, 2022. It is now read-only.
File diff selection improvements and add stage/unstage context menu option #478
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.
File diff selection improvements:
Fixes #469
Fixes #471
When lines are selected in line mode...
when selecting a hunk header, shift/cmd-clicking should retain previous selections, and additionally select or unselect lines as appropriate, keeping line mode
When a hunk is selected and we're in hunk mode...
when selecting another hunk header or a line within a hunk while pressing shift or command, the entire hunk is additionally selected or unselected as appropriate, keeping hunk mode
Entering modes
Indication of selection mode
In order to make it clear which selection mode you are in (line vs hunk) it would be good to add some different styling to hunks when in hunk mode, like so:
@simurai do you have any 💭s on what would look best, or any other ideas? Right now this PR implements the former.