Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't open the commit editor when staging last hunk (#26939)
Max Brunsfeld430bd83e4d8c
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex 0c863cfab89..a5f87fef6c1 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -14020,8 +14020,6 @@ impl Editor {self.change_selections(Some(autoscroll), window, cx, |s| {s.select_ranges([destination..destination]);});- } else if all_diff_hunks_expanded {- window.dispatch_action(::git::ExpandCommitEditor.boxed_clone(), cx);}}diff --git a/crates/git_ui/src/project_diff.rs b/crates/git_ui/src/project_diff.rsindex ec43467181b..40168aeffac 100644--- a/crates/git_ui/src/project_diff.rs+++ b/crates/git_ui/src/project_diff.rs@@ -806,6 +806,7 @@ impl ProjectDiffToolbar {fn project_diff(&self, _: &App) -> Option<Entity<ProjectDiff>> {self.project_diff.as_ref()?.upgrade()}+fn dispatch_action(&self, action: &dyn Action, window: &mut Window, cx: &mut Context<Self>) {if let Some(project_diff) = self.project_diff(cx) {project_diff.focus_handle(cx).focus(window);