diff options
author | Blaž Hrastnik | 2020-10-06 07:00:23 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-10-13 14:13:56 +0000 |
commit | 1dba0f2b1ccc0c6a29e05876b7b7153373221f87 (patch) | |
tree | 2114ae0a23fb379c57b7ad1de491fa8406cbaffe /helix-core/src/selection.rs | |
parent | eba5b1ef3329bef35fe387b03bdf2f32cdb34761 (diff) |
Simple yank/paste registers.
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r-- | helix-core/src/selection.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs index 2251c77f..bc677330 100644 --- a/helix-core/src/selection.rs +++ b/helix-core/src/selection.rs @@ -110,7 +110,8 @@ impl Range { #[inline] pub fn fragment<'a>(&'a self, text: &'a RopeSlice) -> Cow<'a, str> { - Cow::from(text.slice(self.from()..self.to())) + // end inclusive + Cow::from(text.slice(self.from()..self.to() + 1)) } } |