summaryrefslogtreecommitdiff
path: root/helix-core/src/textobject.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core/src/textobject.rs')
-rw-r--r--helix-core/src/textobject.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/helix-core/src/textobject.rs b/helix-core/src/textobject.rs
index b06bca5d..b59ff6fa 100644
--- a/helix-core/src/textobject.rs
+++ b/helix-core/src/textobject.rs
@@ -98,11 +98,8 @@ pub fn textobject_surround(
) -> Range {
surround::find_nth_pairs_pos(slice, ch, range.head, count)
.map(|(anchor, head)| match textobject {
- TextObject::Inside => Range::new(
- next_grapheme_boundary(slice, anchor),
- prev_grapheme_boundary(slice, head),
- ),
- TextObject::Around => Range::new(anchor, head),
+ TextObject::Inside => Range::new(next_grapheme_boundary(slice, anchor), head),
+ TextObject::Around => Range::new(anchor, next_grapheme_boundary(slice, head)),
})
.unwrap_or(range)
}