crates/git_ui/src/git_panel.rs 🔗
@@ -745,7 +745,7 @@ impl GitPanel {
) {
self.select_first_entry_if_none(cx);
- cx.focus_self(window);
+ self.focus_handle.focus(window);
cx.notify();
}
Xipeng Jin created
Closes #31155
Release Notes:
- Ensure `git_panel::FocusChanges` bypasses the panel’s `Focusable`
logic and directly focuses the `ChangesList` handle so the command works
even when the repository has no entries.
- Keep the `Focusable` behavior from the commit 45b126a (which routes
empty panels to the commit editor) by handling this special-case action
rather than regressing the default focus experience.
crates/git_ui/src/git_panel.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -745,7 +745,7 @@ impl GitPanel {
) {
self.select_first_entry_if_none(cx);
- cx.focus_self(window);
+ self.focus_handle.focus(window);
cx.notify();
}