Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
workspace: Fix closing remote workspace restores last local workspace on startup (#34931)
Smit Barmase11ac83f3d46b
diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex 2c223c476bc..4c70c52d5a1 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -7378,6 +7378,17 @@ async fn open_ssh_project_inner(return Err(project_path_errors.pop().context("no paths given")?);}+ if let Some(detach_session_task) = window+ .update(cx, |_workspace, window, cx| {+ cx.spawn_in(window, async move |this, cx| {+ this.update_in(cx, |this, window, cx| this.remove_from_session(window, cx))+ })+ })+ .ok()+ {+ detach_session_task.await.ok();+ }+cx.update_window(window.into(), |_, window, cx| {window.replace_root(cx, |window, cx| {telemetry::event!("SSH Project Opened");