Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions app/src/pane_group/pane/terminal_pane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,13 +971,15 @@ fn handle_terminal_view_event(
}
}
Event::ShareModalOpened(block_id) => {
let Some(session) = group.terminal_view_from_pane_id(pane_id, ctx) else {
return;
};
let model = session.read(ctx, |view, _| view.model.clone());

group.terminal_with_open_share_block_modal = Some(terminal_pane_id);
group.share_block_modal.update(ctx, |share_modal, ctx| {
if let Some(session) = group.terminal_view_from_pane_id(pane_id, ctx) {
let model = session.read(ctx, |view, _| view.model.clone());
share_modal.open_with_model_update(model, *block_id, ctx);
ctx.notify();
}
share_modal.open_with_model_update(model, *block_id, ctx);
ctx.notify();
});
ctx.notify();
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/terminal/share_block_modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,9 @@ impl ShareBlockModal {
.finish()
}
None => {
log::warn!("Tried to render share modal without a model");
// The pane group normally prevents this state, but keep the
// fallback quiet if a stale close/open event races a render.
log::debug!("Tried to render share modal without a model");
Empty::new().finish()
}
};
Expand Down