aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/selection.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2020-10-06 07:00:23 +0000
committerBlaž Hrastnik2020-10-13 14:13:56 +0000
commit1dba0f2b1ccc0c6a29e05876b7b7153373221f87 (patch)
tree2114ae0a23fb379c57b7ad1de491fa8406cbaffe /helix-core/src/selection.rs
parenteba5b1ef3329bef35fe387b03bdf2f32cdb34761 (diff)
Simple yank/paste registers.
Diffstat (limited to 'helix-core/src/selection.rs')
-rw-r--r--helix-core/src/selection.rs3
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))
}
}