Enable copy and paste in vim mode
This commit is contained in:
parent
d094d1d891
commit
082036161f
10 changed files with 183 additions and 34 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue