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/app/input/mod.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/app/input/mod.rs') diff --git a/src/app/input/mod.rs b/src/app/input/mod.rs index 21e9a49b..73ddbefd 100644 --- a/src/app/input/mod.rs +++ b/src/app/input/mod.rs @@ -361,6 +361,15 @@ impl App { } } } + if matches!(mouse.kind, MouseEventKind::Down(MouseButton::Left)) + && self + .state + .selection + .as_ref() + .is_none_or(crate::selection::Selection::is_in_progress) + { + self.selection_highlight_clear_deadline = None; + } } if previous_settings_section != crate::app::state::SettingsSection::Integrations && self.state.settings.section == crate::app::state::SettingsSection::Integrations @@ -482,11 +491,6 @@ impl App { } fn handle_pane_double_click(&mut self, mouse: MouseEvent) -> bool { - if !self.state.copy_on_select { - self.last_pane_click = None; - return false; - } - // A pane press stops being a double-click candidate once it becomes // a drag or completes as a real text selection. match mouse.kind { -- cgit v1.2.3