Updated is_child() to omit self

This commit is contained in:
Mikayla Maki 2022-12-09 12:07:49 -08:00
parent 3a4f8d267a
commit 34388a1d31
2 changed files with 4 additions and 3 deletions

View file

@ -2542,7 +2542,7 @@ impl View for Workspace {
} else {
for pane in self.panes() {
let view = view.clone();
if pane.update(cx, |_, cx| cx.is_child(view)) {
if pane.update(cx, |_, cx| view.id() == cx.view_id() || cx.is_child(view)) {
self.handle_pane_focused(pane.clone(), cx);
break;
}