aboutsummaryrefslogtreecommitdiffstats
path: root/src/rope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/rope.rs')
-rw-r--r--src/rope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rope.rs b/src/rope.rs
index 5f4fca8..11a030b 100644
--- a/src/rope.rs
+++ b/src/rope.rs
@@ -242,9 +242,9 @@ impl Rope {
let start = self.line_idx(n);
let mut end = self.len();
if n < self.lines() {
- end = self.line_idx(n+1);
+ end = self.line_idx(n+1)-1;
}
- return self.slice(start, end-1);
+ return self.slice(start, end);
}
fn is_char_boundary(&self, index: usize) -> bool {