diff --git a/crates/zed2/src/zed2.rs b/crates/zed2/src/zed2.rs index 7368d3a5efe22319bc398d72af514a746a6fdc39..de985496c8eeb30a6359aedac3122adf2d6dc816 100644 --- a/crates/zed2/src/zed2.rs +++ b/crates/zed2/src/zed2.rs @@ -55,7 +55,7 @@ pub fn initialize_workspace( ) -> Task> { cx.spawn(|mut cx| async move { workspace_handle.update(&mut cx, |workspace, cx| { - let workspace_handle = cx.view(); + let workspace_handle = cx.view().clone(); cx.subscribe(&workspace_handle, { move |workspace, _, event, cx| { if let workspace::Event::PaneAdded(pane) = event {