mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 03:59:55 +00:00
Fix mouse interrupting file/dir editing in project panel
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
2c3c8b4cb0
commit
f8d092fdc6
1 changed files with 9 additions and 7 deletions
|
@ -1176,13 +1176,15 @@ impl ProjectPanel {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.on_click(MouseButton::Left, move |e, cx| {
|
.on_click(MouseButton::Left, move |e, cx| {
|
||||||
if kind == EntryKind::Dir {
|
if !show_editor {
|
||||||
cx.dispatch_action(ToggleExpanded(entry_id))
|
if kind == EntryKind::Dir {
|
||||||
} else {
|
cx.dispatch_action(ToggleExpanded(entry_id))
|
||||||
cx.dispatch_action(Open {
|
} else {
|
||||||
entry_id,
|
cx.dispatch_action(Open {
|
||||||
change_focus: e.click_count > 1,
|
entry_id,
|
||||||
})
|
change_focus: e.click_count > 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.on_down(MouseButton::Right, move |e, cx| {
|
.on_down(MouseButton::Right, move |e, cx| {
|
||||||
|
|
Loading…
Reference in a new issue