Enable copy and paste in vim mode

This commit is contained in:
Keith Simmons 2022-05-19 17:42:30 -07:00
parent d094d1d891
commit 082036161f
10 changed files with 183 additions and 34 deletions

View file

@ -1,6 +1,7 @@
use crate::Anchor;
use crate::{rope::TextDimension, BufferSnapshot};
use std::cmp::Ordering;
use std::ops::Range;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum SelectionGoal {
@ -83,6 +84,10 @@ impl<T: Copy + Ord> Selection<T> {
self.goal = new_goal;
self.reversed = false;
}
pub fn range(&self) -> Range<T> {
self.start..self.end
}
}
impl Selection<usize> {