diff --git a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeLookupTree.ts b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeLookupTree.ts index d9173ad5d6..ee05dfb537 100644 --- a/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeLookupTree.ts +++ b/packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/RangeLookupTree.ts @@ -41,7 +41,7 @@ function createNodes( const parent = parents[parents.length - 1]; if (parent != null) { - parent.addChildNode(node); + parent.children.add(node); } else { results.push(node); } @@ -53,7 +53,7 @@ function createNodes( } class RangeLookupTreeNode { - private children: RangeLookupList>; + public children: RangeLookupList>; constructor(private item: T) { this.children = new RangeLookupList([]); @@ -63,10 +63,6 @@ class RangeLookupTreeNode { return this.item.range; } - addChildNode(node: RangeLookupTreeNode) { - this.children.add(node); - } - getSmallLestContaining(range: Range): T { const child = this.children .getContaining(range)