Do not allow drag and drop of FS entries into the remote projects (#19565)
Release Notes: - N/A
This commit is contained in:
parent
23ad470daf
commit
7a6550c1d1
4 changed files with 87 additions and 71 deletions
|
@ -89,6 +89,7 @@ impl TerminalPanel {
|
|||
pane.display_nav_history_buttons(None);
|
||||
pane.set_should_display_tab_bar(|_| true);
|
||||
|
||||
let is_local = workspace.project().read(cx).is_local();
|
||||
let workspace = workspace.weak_handle();
|
||||
pane.set_custom_drop_handle(cx, move |pane, dropped_item, cx| {
|
||||
if let Some(tab) = dropped_item.downcast_ref::<DraggedTab>() {
|
||||
|
@ -128,8 +129,10 @@ impl TerminalPanel {
|
|||
{
|
||||
add_paths_to_terminal(pane, &[entry_path], cx);
|
||||
}
|
||||
} else if let Some(paths) = dropped_item.downcast_ref::<ExternalPaths>() {
|
||||
add_paths_to_terminal(pane, paths.paths(), cx);
|
||||
} else if is_local {
|
||||
if let Some(paths) = dropped_item.downcast_ref::<ExternalPaths>() {
|
||||
add_paths_to_terminal(pane, paths.paths(), cx);
|
||||
}
|
||||
}
|
||||
|
||||
ControlFlow::Break(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue