aboutsummaryrefslogtreecommitdiff
path: root/src/app/state.rs
diff options
context:
space:
mode:
authorRobin Gagnon <me@reobin.dev>2026-06-01 09:45:55 -0500
committerGitHub <noreply@github.com>2026-06-01 17:45:55 +0300
commitab649adfded619a0461e36e2eb3929dd5f9e7567 (patch)
tree438d1f20ebe73c309c78bb5822effb768476971f /src/app/state.rs
parentbd1d2f7cc5fece3fa91eadb55fb7e0a9f3331780 (diff)
fix: preserve linewise copy selection (#389)
refs #360 Co-authored-by: Can Celik <ogulcancelik@gmail.com>
Diffstat (limited to 'src/app/state.rs')
-rw-r--r--src/app/state.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/app/state.rs b/src/app/state.rs
index 1584bc19..d38699eb 100644
--- a/src/app/state.rs
+++ b/src/app/state.rs
@@ -813,7 +813,13 @@ pub(crate) struct CopyModeState {
pub pane_id: PaneId,
pub cursor_row: u16,
pub cursor_col: u16,
- pub selecting: bool,
+ pub selection: Option<CopyModeSelection>,
+}
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+pub(crate) enum CopyModeSelection {
+ Character,
+ Linewise { anchor_row: u32 },
}
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]