aboutsummaryrefslogtreecommitdiff
path: root/src/app/input/mouse.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-11 02:46:41 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-11 02:46:58 +0300
commit46174563489273199a17c982356c6e4674ef00d4 (patch)
treee87a16bdb34e45b66124732c3458eed1e64d91a0 /src/app/input/mouse.rs
parent3b8aeee166d1594e1f8e41631a51748104d76834 (diff)
feat: add copy-on-select setting
Diffstat (limited to 'src/app/input/mouse.rs')
-rw-r--r--src/app/input/mouse.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/app/input/mouse.rs b/src/app/input/mouse.rs
index 495bcd53..911e27c0 100644
--- a/src/app/input/mouse.rs
+++ b/src/app/input/mouse.rs
@@ -640,12 +640,14 @@ impl AppState {
mouse.row - info.inner_rect.y,
mouse.column - info.inner_rect.x,
);
- self.selection = Some(Selection::anchor(
- info.id,
- row,
- col,
- self.pane_scroll_metrics(terminal_runtimes, info.id),
- ));
+ if self.copy_on_select {
+ self.selection = Some(Selection::anchor(
+ info.id,
+ row,
+ col,
+ self.pane_scroll_metrics(terminal_runtimes, info.id),
+ ));
+ }
if let Some(ws_idx) = self.active {
return Some(MouseAction::FocusPane {
ws_idx,