aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r--helix-core/src/selection.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs
index 91edcf81..2e7104cd 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -180,6 +180,10 @@ impl Selection {
&self.ranges
}
+ pub fn primary_index(&self) -> usize {
+ self.primary_index
+ }
+
#[must_use]
/// Constructs a selection holding a single range.
pub fn single(anchor: usize, head: usize) -> Self {