Skip to content

Commit da66455

Browse files
Clean up
1 parent 794449a commit da66455

File tree

1 file changed

+2
-5
lines changed
  • packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/CollectionItemScopeHandler

1 file changed

+2
-5
lines changed

packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/CollectionItemScopeHandler/RangeNode.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ export class RangeNode extends Range {
88
}
99

1010
getSmallLestContaining(separator: Range): Range {
11-
let result = this.range;
12-
1311
for (const child of this.children) {
1412
if (child.contains(separator)) {
15-
result = child.getSmallLestContaining(separator);
16-
break;
13+
return child.getSmallLestContaining(separator);
1714
}
1815
}
1916

20-
return result;
17+
return this.range;
2118
}
2219
}

0 commit comments

Comments
 (0)