diff options
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r-- | helix-core/src/selection.rs | 4 |
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 { |