diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index 99de3733a16f96fbbad5510c181071b5753c4c7c..c63c531cebddcfa1f807ee5460a54b1976d9c175 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -8363,9 +8363,9 @@ impl Editor { // .max_point() // } - // pub fn text(&self, cx: &AppContext) -> String { - // self.buffer.read(cx).read(cx).text() - // } + pub fn text(&self, cx: &AppContext) -> String { + self.buffer.read(cx).read(cx).text() + } // pub fn set_text(&mut self, text: impl Into>, cx: &mut ViewContext) { // self.transact(cx, |this, cx| { @@ -9185,6 +9185,10 @@ impl Editor { // }); // supports // } + + fn focus(&self, cx: &mut WindowContext) { + cx.focus(&self.focus_handle) + } } pub trait CollaborationHub {