Don't panic when trying to reuse an existing workspace (#3538)

Release Notes:

- N/A
This commit is contained in:
Antonio Scandurra 2023-12-07 18:23:33 +01:00 committed by GitHub
commit c91207b450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4188,14 +4188,14 @@ pub fn open_paths(
}); });
cx.spawn(move |mut cx| async move { cx.spawn(move |mut cx| async move {
if let Some(existing) = existing { if let Some(existing) = existing {
// // Ok(( Ok((
// existing.clone(), existing.clone(),
// cx.update_window_root(&existing, |workspace, cx| { existing
// workspace.open_paths(abs_paths, true, cx) .update(&mut cx, |workspace, cx| {
// })? workspace.open_paths(abs_paths, true, cx)
// .await, })?
// )) .await,
todo!() ))
} else { } else {
cx.update(move |cx| { cx.update(move |cx| {
Workspace::new_local(abs_paths, app_state.clone(), requesting_window, cx) Workspace::new_local(abs_paths, app_state.clone(), requesting_window, cx)