Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix mouse interrupting file/dir editing in project panel

Petros Amoiridisf8d092fdc6dd
diff --git a/crates/project_panel/src/project_panel.rs b/crates/project_panel/src/project_panel.rs
index 0042695950f..73b558bd5bc 100644
--- a/crates/project_panel/src/project_panel.rs
+++ b/crates/project_panel/src/project_panel.rs
@@ -1176,13 +1176,15 @@ impl ProjectPanel {
)
})
.on_click(MouseButton::Left, move |e, cx| {
- if kind == EntryKind::Dir {
- cx.dispatch_action(ToggleExpanded(entry_id))
- } else {
- cx.dispatch_action(Open {
- entry_id,
- change_focus: e.click_count > 1,
- })
+ if !show_editor {
+ if kind == EntryKind::Dir {
+ cx.dispatch_action(ToggleExpanded(entry_id))
+ } else {
+ cx.dispatch_action(Open {
+ entry_id,
+ change_focus: e.click_count > 1,
+ })
+ }
}
})
.on_down(MouseButton::Right, move |e, cx| {