Skip to content

Commit d3eb687

Browse files
clean up
1 parent 6612818 commit d3eb687

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

packages/cursorless-engine/src/processTargets/modifiers/scopeHandlers/ContiguousScopeHandler.ts

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import {
77
TextEditor,
88
next,
99
} from "@cursorless/common";
10-
import { zip } from "itertools";
1110
import { ScopeHandlerFactory } from ".";
1211
import { Target } from "../../../typings/target.types";
13-
import { createContinuousRangeTarget } from "../../createContinuousRangeTarget";
12+
import { constructScopeRangeTarget } from "../constructScopeRangeTarget";
1413
import { BaseScopeHandler } from "./BaseScopeHandler";
1514
import type { TargetScope } from "./scope.types";
1615
import type {
@@ -87,23 +86,7 @@ function combineScopes(scope1: TargetScope, scope2: TargetScope): TargetScope {
8786
editor: scope1.editor,
8887
domain: scope1.domain.union(scope2.domain),
8988
getTargets: (isReversed) => {
90-
return zip(
91-
scope1.getTargets(isReversed),
92-
scope2.getTargets(isReversed),
93-
).map(([target1, target2]) => {
94-
const [startTarget, endTarget] = getTargetsInDocumentOrder(
95-
target1,
96-
target2,
97-
);
98-
99-
return createContinuousRangeTarget(
100-
isReversed,
101-
startTarget,
102-
endTarget,
103-
true,
104-
true,
105-
);
106-
});
89+
return constructScopeRangeTarget(isReversed, scope1, scope2);
10790
},
10891
};
10992
}

0 commit comments

Comments
 (0)