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.

Fix input example (#24165)

Conrad Irwin225f0c4d12ae
diff --git a/crates/gpui/examples/input.rs b/crates/gpui/examples/input.rs
index bef1546f06c..7d0a72f21a7 100644
--- a/crates/gpui/examples/input.rs
+++ b/crates/gpui/examples/input.rs
@@ -697,7 +697,7 @@ fn main() {
},
)
.unwrap();
- let view = window.root(cx).unwrap();
+ let view = window.update(cx, |_, _, cx| cx.entity()).unwrap();
cx.observe_keystrokes(move |ev, _, cx| {
view.update(cx, |view, cx| {
view.recent_keystrokes.push(ev.keystroke.clone());