Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Wire up `NewWindow` action
Marshall Bowersed31d36ac101
diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rsindex 4b14ec42f1e..3fdccb2de42 100644--- a/crates/editor2/src/editor.rs+++ b/crates/editor2/src/editor.rs@@ -431,6 +431,15 @@ pub fn init(cx: &mut AppContext) {.detach();}});+ cx.on_action(move |_: &workspace::NewWindow, cx| {+ let app_state = cx.global::<Weak<workspace::AppState>>();+ if let Some(app_state) = app_state.upgrade() {+ workspace::open_new(&app_state, cx, |workspace, cx| {+ Editor::new_file(workspace, &Default::default(), cx)+ })+ .detach();+ }+ })}trait InvalidationRegion {