git_ui: Open file on double-click in status list (#47989)

Xiaobo Liu created

Release Notes:

- Improved open file on double-click in status list

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>

Change summary

crates/git_ui/src/git_panel.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/git_ui/src/git_panel.rs 🔗

@@ -5072,7 +5072,7 @@ impl GitPanel {
                 cx.listener(move |this, event: &ClickEvent, window, cx| {
                     this.selected_entry = Some(ix);
                     cx.notify();
-                    if event.modifiers().secondary() {
+                    if event.click_count() > 1 || event.modifiers().secondary() {
                         this.open_file(&Default::default(), window, cx)
                     } else {
                         this.open_diff(&Default::default(), window, cx);