fix(tiled-panes): opening panes from the cli (#3963)

This commit is contained in:
Aram Drevekenin 2025-01-31 13:10:32 +01:00 committed by GitHub
parent c0160cf709
commit ed12efd454
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -235,7 +235,7 @@ impl TiledPanes {
let stacked_resize = { *self.stacked_resize.borrow() };
if let Some(client_id) = client_id {
if stacked_resize {
if stacked_resize && self.is_connected(&client_id) {
self.add_pane_with_stacked_resize(pane_id, pane, should_relayout, client_id);
return;
}
@ -2406,6 +2406,9 @@ impl TiledPanes {
StackedPanes::new_from_btreemap(&mut self.panes, &self.panes_to_hide)
.new_stack(root_pane_id, pane_count_in_stack)
}
fn is_connected(&self, client_id: &ClientId) -> bool {
self.connected_clients.borrow().contains(&client_id)
}
}
#[allow(clippy::borrowed_box)]