summaryrefslogtreecommitdiff
path: root/src/client/shell/actions.rs
diff options
context:
space:
mode:
authorJJ Liebig <jonathan.liebig@gmail.com>2026-09-06 16:27:52 +0200
committerGitHub <noreply@github.com>2026-09-06 16:27:52 +0200
commit9d111db9c83823eb4ce8623d9707e28153b01334 (patch)
tree58ff584b1fc79e23dc00f093860908c9bad4f2b7 /src/client/shell/actions.rs
parent5a64e8da4551990367dd26d77cf3b654dfa27a73 (diff)
fix: keep manual selections active during terminal output (#3684)
Diffstat (limited to 'src/client/shell/actions.rs')
-rw-r--r--src/client/shell/actions.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/shell/actions.rs b/src/client/shell/actions.rs
index e62d75ff..834169fe 100644
--- a/src/client/shell/actions.rs
+++ b/src/client/shell/actions.rs
@@ -247,7 +247,7 @@ impl ClientShellState {
}
}
- pub(super) fn request_selection_copy(&mut self, outcome: &mut ClientShellInput) {
+ pub(super) fn request_selection_copy(&mut self, outcome: &mut ClientShellInput, live: bool) {
let Some(selection) = self.selection.as_ref() else {
return;
};
@@ -256,7 +256,10 @@ impl ClientShellState {
.pane_surface
.as_ref()
.and_then(|surface| surface.panes.iter().find(|pane| pane.pane_id == pane_id))
- .map(|pane| pane.content_revision);
+ .map(|pane| pane.content_revision)
+ // Read a manual mouse selection atomically from the live terminal. Output
+ // between the displayed frame and this request must not reject the copy.
+ .filter(|_| !live);
let (anchor, cursor) = selection.ordered_cells();
self.push_endpoint_method_with_kind(
crate::api::schema::Method::PaneSelectionRead(
@@ -700,7 +703,7 @@ impl ClientShellState {
self.selection_highlight_clear_deadline =
Some(std::time::Instant::now() + std::time::Duration::from_millis(500));
let mut outcome = ClientShellInput::default();
- self.request_selection_copy(&mut outcome);
+ self.request_selection_copy(&mut outcome, false);
return (true, outcome.actions);
}
PendingEndpointKind::PaneLinkActivate {