the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
fix: retain mouse selections across unrelated terminal output (#3641)
JJ Liebigaf7e189bd674
diff --git a/src/client/shell/state.rs b/src/client/shell/state.rsindex 6b00e6c34..60307f66a 100644--- a/src/client/shell/state.rs+++ b/src/client/shell/state.rs@@ -1564,8 +1564,7 @@ impl ClientShellState {return false;};previous.content_revision != next.content_revision- && (!selection.is_in_progress()- || !previous.content_revision.is_multiple_of(2)+ && (!previous.content_revision.is_multiple_of(2)|| !next.content_revision.is_multiple_of(2)|| previous.inner_rect.width != next.inner_rect.width|| previous.inner_rect.height != next.inner_rect.heightdiff --git a/src/client/shell/tests/copy.rs b/src/client/shell/tests/copy.rsindex 64cc78e6c..e8555db6e 100644--- a/src/client/shell/tests/copy.rs+++ b/src/client/shell/tests/copy.rs@@ -199,6 +199,16 @@ fn retained_mouse_selection_copies_only_on_exact_copy_shortcut() {.as_ref().is_some_and(crate::selection::Selection::is_finalized));+ // Agent output outside the selected text must not cancel a pending copy.+ let mut updated = state.pane_surface.clone().expect("pane surface");+ updated.panes[0].content_revision = 2;+ updated.frame.cells[4].symbol = "-".into();+ state.set_pane_surface(updated);+ assert!(state+ .selection+ .as_ref()+ .is_some_and(crate::selection::Selection::is_finalized));+let copy = state.handle_raw_events(vec![RawInputEvent::Key(crate::input::TerminalKey::new(KeyCode::Char('c'),KeyModifiers::CONTROL,