summaryrefslogtreecommitdiff
path: root/src/selection.rs
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-07-16 21:57:20 +0300
committerGitHub <noreply@github.com>2026-07-16 21:57:20 +0300
commitf43a6d4a5591a0286e01de737be7b3f42416898b (patch)
tree9245146f3cc399bc6e8477d43c5de5cf3d3f1a42 /src/selection.rs
parent616d1dd8125ece4a9102b231864cb4fc4b761497 (diff)
fix: preserve selection when auto-copy is disabled (#1496)
refs #1471 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
Diffstat (limited to 'src/selection.rs')
-rw-r--r--src/selection.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/selection.rs b/src/selection.rs
index 4fd65b6d..c725be2e 100644
--- a/src/selection.rs
+++ b/src/selection.rs
@@ -4,8 +4,8 @@
//!
//! MouseDown in pane → Anchor recorded (no visual yet)
//! MouseDrag → Selection becomes active, cells highlighted
-//! MouseUp → Text extracted, copied via OSC 52, highlight stays
-//! Next click / key → Selection cleared
+//! MouseUp → Selection finalized; optionally copied by the caller
+//! Next click / key → A retained selection is cleared
//!
//! Double-click copy also briefly highlights the selected word.
//!
@@ -25,8 +25,8 @@ enum Phase {
Anchored,
/// Mouse has moved from the anchor point. Cells are being highlighted.
Dragging,
- /// Mouse released after dragging. Selection is visible and text
- /// has been copied to clipboard. Cleared on next interaction.
+ /// Mouse released after dragging. Selection is visible and the gesture is
+ /// complete. Clipboard policy is owned by the caller.
Done,
}
@@ -159,8 +159,8 @@ impl Selection {
self.phase == Phase::Dragging || self.phase == Phase::Done
}
- /// Whether this selection was already finalized and copied.
- pub fn is_done(&self) -> bool {
+ /// Whether this selection was already finalized.
+ pub fn is_finalized(&self) -> bool {
self.phase == Phase::Done
}