diff options
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)) } } |