Search only in active pane when using Editor::find_or_create
This commit is contained in:
parent
a691c2fbdb
commit
e6755f4115
2 changed files with 2 additions and 11 deletions
|
@ -646,16 +646,6 @@ impl Workspace {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn item_for_entry(
|
||||
&self,
|
||||
entry_id: ProjectEntryId,
|
||||
cx: &AppContext,
|
||||
) -> Option<Box<dyn ItemHandle>> {
|
||||
self.panes()
|
||||
.iter()
|
||||
.find_map(|pane| pane.read(cx).item_for_entry(entry_id))
|
||||
}
|
||||
|
||||
pub fn item_of_type<T: Item>(&self, cx: &AppContext) -> Option<ViewHandle<T>> {
|
||||
self.items_of_type(cx).max_by_key(|item| item.id())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue