mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-09 02:44:49 +00:00
Don't panic when trying to reuse an existing workspace
Co-Authored-By: Nathan <nathan@zed.dev>
This commit is contained in:
parent
ea708c50f0
commit
2461902086
1 changed files with 8 additions and 8 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue