mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-07 02:57:34 +00:00
Add text and focus to editor
This commit is contained in:
parent
a21c49c015
commit
5c450843a5
1 changed files with 7 additions and 3 deletions
|
@ -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<Arc<str>>, cx: &mut ViewContext<Self>) {
|
||||
// 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 {
|
||||
|
|
Loading…
Reference in a new issue