mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Merge pull request #2041 from zed-industries/fix-renaming-file
Fix mouse interrupting file/dir editing in project panel
This commit is contained in:
commit
9f3c8c1e3a
@ -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| {
|
||||
|
Loading…
Reference in New Issue
Block a user