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 19:38:20 +00:00
committed by GitHub
co-authored by Nate Nate Butler
parent 74e8164cd7
commit a6a8d79d86
2 changed files with 68 additions and 63 deletions
+2 -2
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,