From 71999cce43b3750362cdea534c12cbf320d2677b Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 22 Mar 2021 12:18:48 +0900 Subject: Implement auto-pairs behavior for open and close. --- helix-core/src/selection.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'helix-core/src/selection.rs') 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 { -- cgit v1.2.3-70-g09d2