aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/state.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/state.rs
parent5a64e8da4551990367dd26d77cf3b654dfa27a73 (diff)
fix: keep manual selections active during terminal output (#3684)
Diffstat (limited to 'src/client/shell/state.rs')
-rw-r--r--src/client/shell/state.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/client/shell/state.rs b/src/client/shell/state.rs
index b30f57d0..81845d35 100644
--- a/src/client/shell/state.rs
+++ b/src/client/shell/state.rs
@@ -1643,19 +1643,21 @@ impl ClientShellState {
let (Some(previous), Some(next)) = (previous, next) else {
return false;
};
- previous.content_revision != next.content_revision
+ previous.inner_rect.width != next.inner_rect.width
+ || previous.inner_rect.height != next.inner_rect.height
+ || previous.alternate_screen_active != next.alternate_screen_active
+ // Manual mouse selections track a live buffer range, not a content revision.
+ || (self.config.copy_on_select
+ && previous.content_revision != next.content_revision
&& (!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.height
- || previous.alternate_screen_active != next.alternate_screen_active
|| !selection_cells_unchanged(
selection,
previous_surface,
previous,
&surface,
next,
- ))
+ )))
});
if selection_content_changed {
self.selection = None;