aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src/object.rs
diff options
context:
space:
mode:
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 19ff9d96..1c644fb2 100644
--- a/helix-core/src/object.rs
+++ b/helix-core/src/object.rs
@@ -4,7 +4,7 @@ use smallvec::smallvec;
// TODO: to contract_selection we'd need to store the previous ranges before expand.
// Maybe just contract to the first child node?
pub fn expand_selection(syntax: &Syntax, text: RopeSlice, selection: &Selection) -> Selection {
- let tree = syntax.root_layer.tree.as_ref().unwrap();
+ let tree = syntax.tree();
selection.transform(|range| {
let from = text.char_to_byte(range.from());