Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Don't panic when trying to reuse an existing workspace
Antonio Scandurra2461902086d8
diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rsindex abf90899297..e2965bb8d7a 100644--- a/crates/workspace2/src/workspace2.rs+++ b/crates/workspace2/src/workspace2.rs@@ -4188,14 +4188,14 @@ pub fn open_paths(});cx.spawn(move |mut cx| async move {if let Some(existing) = existing {- // // Ok((- // existing.clone(),- // cx.update_window_root(&existing, |workspace, cx| {- // workspace.open_paths(abs_paths, true, cx)- // })?- // .await,- // ))- todo!()+ Ok((+ existing.clone(),+ existing+ .update(&mut cx, |workspace, cx| {+ workspace.open_paths(abs_paths, true, cx)+ })?+ .await,+ ))} else {cx.update(move |cx| {Workspace::new_local(abs_paths, app_state.clone(), requesting_window, cx)