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 7dafc97a..e452c2e2 100644
--- a/helix-core/src/selection.rs
+++ b/helix-core/src/selection.rs
@@ -35,6 +35,10 @@ impl Range {
}
}
+ pub fn point(head: usize) -> Self {
+ Self::new(head, head)
+ }
+
/// Start of the range.
#[inline]
#[must_use]