Activate the *newest* existing project find view on cmd-shift-F
This commit is contained in:
parent
2f427769df
commit
e96d0a9355
2 changed files with 13 additions and 1 deletions
|
@ -826,6 +826,15 @@ impl Workspace {
|
|||
.find_map(|i| i.upgrade(cx).and_then(|i| i.to_any().downcast()))
|
||||
}
|
||||
|
||||
pub fn items_of_type<'a, T: Item>(
|
||||
&'a self,
|
||||
cx: &'a AppContext,
|
||||
) -> impl 'a + Iterator<Item = ModelHandle<T>> {
|
||||
self.items
|
||||
.iter()
|
||||
.filter_map(|i| i.upgrade(cx).and_then(|i| i.to_any().downcast()))
|
||||
}
|
||||
|
||||
pub fn active_item(&self, cx: &AppContext) -> Option<Box<dyn ItemViewHandle>> {
|
||||
self.active_pane().read(cx).active_item()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue