diff options
author | Skyler Hawthorne | 2022-10-22 21:29:09 +0000 |
---|---|---|
committer | Michael Davis | 2023-03-20 23:34:40 +0000 |
commit | d3b051d28ea62c313fc72583d04f2a897e8d6f40 (patch) | |
tree | 3a3ff15f7ba98190720850a4059298f3f0676e24 /helix-core/src/textobject.rs | |
parent | 58ea1930544df165a4a1342932e4dd8cb93e14ea (diff) |
fix test::plain
test::plain uses char indices when it should use byte indices
Diffstat (limited to 'helix-core/src/textobject.rs')
-rw-r--r-- | helix-core/src/textobject.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-core/src/textobject.rs b/helix-core/src/textobject.rs index 6e3f18cf..bf00a458 100644 --- a/helix-core/src/textobject.rs +++ b/helix-core/src/textobject.rs @@ -437,7 +437,7 @@ mod test { let text = Rope::from(s.as_str()); let selection = selection .transform(|r| textobject_paragraph(text.slice(..), r, TextObject::Inside, 1)); - let actual = crate::test::plain(&s, &selection); + let actual = crate::test::plain(s.as_ref(), &selection); assert_eq!(actual, expected, "\nbefore: `{:?}`", before); } } @@ -460,7 +460,7 @@ mod test { let text = Rope::from(s.as_str()); let selection = selection .transform(|r| textobject_paragraph(text.slice(..), r, TextObject::Inside, 2)); - let actual = crate::test::plain(&s, &selection); + let actual = crate::test::plain(s.as_ref(), &selection); assert_eq!(actual, expected, "\nbefore: `{:?}`", before); } } @@ -491,7 +491,7 @@ mod test { let text = Rope::from(s.as_str()); let selection = selection .transform(|r| textobject_paragraph(text.slice(..), r, TextObject::Around, 1)); - let actual = crate::test::plain(&s, &selection); + let actual = crate::test::plain(s.as_ref(), &selection); assert_eq!(actual, expected, "\nbefore: `{:?}`", before); } } |