Initial visual mode

This commit is contained in:
Keith Simmons 2022-05-03 10:29:57 -07:00
parent 5e2e859413
commit 37c921f972
13 changed files with 621 additions and 113 deletions

View file

@ -85,6 +85,19 @@ impl<T: Copy + Ord> Selection<T> {
}
}
impl Selection<usize> {
#[cfg(feature = "test-support")]
pub fn from_offset(offset: usize) -> Self {
Selection {
id: 0,
start: offset,
end: offset,
goal: SelectionGoal::None,
reversed: false,
}
}
}
impl Selection<Anchor> {
pub fn resolve<'a, D: 'a + TextDimension>(
&'a self,