git: Fix cmd-enter (#25628)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-02-25 23:07:55 -07:00 committed by GitHub
parent 08539b32d0
commit 7f214ed25a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 19 deletions

View file

@ -80,17 +80,6 @@ pub fn init(cx: &mut App) {
workspace.register_action(|workspace, _: &ToggleFocus, window, cx| {
workspace.toggle_panel_focus::<GitPanel>(window, cx);
});
// workspace.register_action(|workspace, _: &Commit, window, cx| {
// workspace.open_panel::<GitPanel>(window, cx);
// if let Some(git_panel) = workspace.panel::<GitPanel>(cx) {
// git_panel
// .read(cx)
// .commit_editor
// .focus_handle(cx)
// .focus(window);
// }
// });
},
)
.detach();
@ -1116,8 +1105,9 @@ impl GitPanel {
.contains_focused(window, cx)
{
self.commit_changes(window, cx)
} else {
cx.propagate();
}
cx.propagate();
}
pub(crate) fn commit_changes(&mut self, window: &mut Window, cx: &mut Context<Self>) {