Expose a focus handle from workspace::Item
This commit is contained in:
parent
97d1d9bd9b
commit
6fc7b17259
3 changed files with 18 additions and 8 deletions
|
@ -1185,10 +1185,10 @@ impl Pane {
|
|||
}
|
||||
|
||||
pub fn focus_active_item(&mut self, cx: &mut ViewContext<Self>) {
|
||||
todo!();
|
||||
// if let Some(active_item) = self.active_item() {
|
||||
// cx.focus(active_item.as_any());
|
||||
// }
|
||||
if let Some(active_item) = self.active_item() {
|
||||
let focus_handle = active_item.focus_handle(cx);
|
||||
cx.focus(&focus_handle);
|
||||
}
|
||||
}
|
||||
|
||||
// pub fn split(&mut self, direction: SplitDirection, cx: &mut ViewContext<Self>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue