parent
43e13df9f3
commit
86efde4b76
4 changed files with 109 additions and 42 deletions
|
@ -920,7 +920,22 @@ impl Pane {
|
|||
cx: &AppContext,
|
||||
) -> Option<Box<dyn ItemHandle>> {
|
||||
self.items.iter().find_map(|item| {
|
||||
if item.is_singleton(cx) && item.project_entry_ids(cx).as_slice() == [entry_id] {
|
||||
if item.is_singleton(cx) && (item.project_entry_ids(cx).as_slice() == [entry_id]) {
|
||||
Some(item.boxed_clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn item_for_path(
|
||||
&self,
|
||||
project_path: ProjectPath,
|
||||
cx: &AppContext,
|
||||
) -> Option<Box<dyn ItemHandle>> {
|
||||
self.items.iter().find_map(move |item| {
|
||||
if item.is_singleton(cx) && (item.project_path(cx).as_slice() == [project_path.clone()])
|
||||
{
|
||||
Some(item.boxed_clone())
|
||||
} else {
|
||||
None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue