split selections by size

jump to offset under cursor
This commit is contained in:
alice pellerin
2026-03-21 01:09:03 -05:00
parent 414b545a5c
commit 05d3a8a293
6 changed files with 81 additions and 14 deletions
+4
View File
@@ -30,6 +30,10 @@ impl Cursor {
self.lower_bound()..=self.upper_bound()
}
pub fn len(&self) -> usize {
self.upper_bound() - self.lower_bound() + 1
}
pub const fn contains(&self, index: usize) -> Option<InCursor> {
if index == self.head {
Some(InCursor::Head)