From f43a6d4a5591a0286e01de737be7b3f42416898b Mon Sep 17 00:00:00 2001 From: akbash Date: Thu, 16 Jul 2026 21:57:20 +0300 Subject: fix: preserve selection when auto-copy is disabled (#1496) refs #1471 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> --- src/selection.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/selection.rs') 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 } -- cgit v1.2.3