Allow search assistant editors

This commit is contained in:
Antonio Scandurra 2023-06-07 09:24:18 +02:00
parent 7a78e64831
commit a6feaf1300

View file

@ -221,6 +221,8 @@ impl AssistantPanel {
cx.focus_self(); cx.focus_self();
cx.notify(); cx.notify();
} }
} else {
cx.propagate_action();
} }
} }
@ -1144,6 +1146,13 @@ impl Item for AssistantEditor {
fn tab_tooltip_text(&self, cx: &AppContext) -> Option<Cow<str>> { fn tab_tooltip_text(&self, cx: &AppContext) -> Option<Cow<str>> {
Some(self.title(cx).into()) Some(self.title(cx).into())
} }
fn as_searchable(
&self,
_: &ViewHandle<Self>,
) -> Option<Box<dyn workspace::searchable::SearchableItemHandle>> {
Some(Box::new(self.editor.clone()))
}
} }
#[derive(Debug)] #[derive(Debug)]