git_ui: Commit modal editor cleanup (#25645)

- Fixes cursor style in the commit modal
- Use commit button instead of kb hint
- Update layout to scale better for large commit messages

No message:

![CleanShot 2025-02-26 at 10 33
22@2x](https://github.com/user-attachments/assets/fb6fc4ff-1e1d-46ae-aee0-7e21d73aaf70)

Long Message:
![CleanShot 2025-02-26 at 10 33
55@2x](https://github.com/user-attachments/assets/71a7773c-386b-47d5-abed-9a301360c35b)

![CleanShot 2025-02-26 at 10 34
06@2x](https://github.com/user-attachments/assets/dc41f0b9-2277-4034-9af2-d77fec0488d8)

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2025-02-26 10:55:38 -05:00 committed by GitHub
parent bab65011b4
commit 1f80f58104
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 148 additions and 294 deletions

View file

@ -621,6 +621,10 @@ impl GitPanel {
}
}
pub(crate) fn editor_focus_handle(&self, cx: &mut Context<Self>) -> FocusHandle {
self.commit_editor.focus_handle(cx).clone()
}
fn focus_editor(&mut self, _: &FocusEditor, window: &mut Window, cx: &mut Context<Self>) {
self.commit_editor.update(cx, |editor, cx| {
window.focus(&editor.focus_handle(cx));