Rework hunk controls (#24814)

- Remove prev hunk arrow
- Replace next hunk arrow with "Skip" labelled button
- New "Stage"/"Unstage" labelled button

cc @iamnbutler 

Release Notes:

- N/A

---------

Co-authored-by: Nate <nate@zed.dev>
Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This commit is contained in:
Cole Miller 2025-02-13 14:38:20 -05:00 committed by GitHub
parent 74e8164cd7
commit a6a8d79d86
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 68 additions and 63 deletions

View file

@ -6975,10 +6975,10 @@ impl Editor {
cx: &mut Context<Self>,
) {
let selections = self.selections.all(cx).into_iter().map(|s| s.range());
self.revert_hunks_in_ranges(selections, window, cx);
self.discard_hunks_in_ranges(selections, window, cx);
}
fn revert_hunks_in_ranges(
fn discard_hunks_in_ranges(
&mut self,
ranges: impl Iterator<Item = Range<Point>>,
window: &mut Window,