Skip to content

Commit 0fb7d86

Browse files
Update comments
1 parent ac36859 commit 0fb7d86

File tree

1 file changed

+6
-7
lines changed
  • packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler

1 file changed

+6
-7
lines changed

packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/SurroundingPairScopeHandler/InteriorScopeHandler.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class InteriorScopeHandler extends BaseScopeHandler {
4242
// If the scope type is explicit (ie, the user has specified a scope
4343
// type), then we don't want to include matching pairs. The user might
4444
// have said something like "inside element" and then we don't want to
45-
// yield `<div>`.
45+
// yield the interior of the `<div>` pair.
4646
if (scopeType.explicitScopeType) {
4747
if (languageScopeHandler == null) {
4848
return FallbackScopeHandler.createFromScopeHandlers([]);
@@ -91,18 +91,17 @@ export class InteriorScopeHandler extends BaseScopeHandler {
9191
hints,
9292
);
9393

94-
// The user haven specified an explicit scope types. Just yield all matching scopes.
94+
// No explicit scope type. Just yield all matching scopes.
9595
if (!this.scopeType.explicitScopeType) {
9696
yield* scopes;
9797
}
9898

9999
const targetDomain = new Range(position, hints.distalPosition);
100100

101-
// If the user has specified an explicit scope type, then we only want to
102-
// yield scopes that is contained within the target domain. For example if
103-
// the user said "inside token", then we don't want to yield scopes that are
104-
// larger than the token. The definition of an interior is that it's
105-
// inside the scope.
101+
// For an explicit scope type we only yield scopes that are contained within
102+
// the target domain. E.g the user said "inside token", then we don't want
103+
// to yield scopes that are larger than the token. The definition of an
104+
// interior is that it's inside the scope.
106105
for (const scope of scopes) {
107106
if (targetDomain.contains(scope.domain)) {
108107
yield scope;

0 commit comments

Comments
 (0)