Don't open the commit editor when staging last hunk (#26939)

Closes #26880

Release Notes:

- Removed a behavior where staging the last hunk in the project diff
would open the commit modal.
This commit is contained in:
Max Brunsfeld 2025-03-17 10:58:04 -07:00 committed by GitHub
parent dbe5399fc4
commit 430bd83e4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -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);