summaryrefslogtreecommitdiff
path: root/helix-core/src/object.rs
diff options
context:
space:
mode:
authorNathan Vegdahl2021-06-28 18:40:07 +0000
committerNathan Vegdahl2021-07-01 21:22:28 +0000
commit0ae522f3df433bb778fa2ff98fd3d7047021c6ef (patch)
tree4b230419eb6e62d3de8937159aa34c60685368cc /helix-core/src/object.rs
parent77a266e818bf9d2eded39816b6a77de140234e4f (diff)
Clean up `Selection` to not use so many allocations.
Diffstat (limited to 'helix-core/src/object.rs')
-rw-r--r--helix-core/src/object.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-core/src/object.rs b/helix-core/src/object.rs
index 1c644fb2..863b6e55 100644
--- a/helix-core/src/object.rs
+++ b/helix-core/src/object.rs
@@ -6,7 +6,7 @@ use smallvec::smallvec;
pub fn expand_selection(syntax: &Syntax, text: RopeSlice, selection: &Selection) -> Selection {
let tree = syntax.tree();
- selection.transform(|range| {
+ selection.clone().transformed(|range| {
let from = text.char_to_byte(range.from());
let to = text.char_to_byte(range.to());