Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

repl: Pluck project off editor directly (#48808)

Kyle Kelley495d9665c55c
diff --git a/crates/repl/src/repl_sessions_ui.rs b/crates/repl/src/repl_sessions_ui.rs
index d8bd8869f28..4ad820feeca 100644
--- a/crates/repl/src/repl_sessions_ui.rs
+++ b/crates/repl/src/repl_sessions_ui.rs
@@ -78,9 +78,8 @@ pub fn init(cx: &mut App) {
return;
}
- cx.defer_in(window, |editor, window, cx| {
- let workspace = Workspace::for_window(window, cx);
- let project = workspace.map(|workspace| workspace.read(cx).project().clone());
+ cx.defer_in(window, |editor, _window, cx| {
+ let project = editor.project().cloned();
let is_local_project = project
.as_ref()