Skip to content

Commit 447a9a1

Browse files
Move private function
1 parent 4503f7b commit 447a9a1

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

packages/cursorless-vscode/src/ScopeTreeProvider.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -166,33 +166,6 @@ export class ScopeTreeProvider implements TreeDataProvider<MyTreeItem> {
166166
}
167167
}
168168

169-
private getIntersectionIcon(
170-
editor: TextEditor,
171-
selection: Selection,
172-
scopeType: ScopeType,
173-
): string | undefined {
174-
const scopes = this.scopeProvider.provideScopeRangesForRange(
175-
editor,
176-
scopeType,
177-
selection,
178-
);
179-
180-
for (const scope of scopes) {
181-
for (const target of scope.targets) {
182-
// Scope target exactly matches selection
183-
if (target.contentRange.isRangeEqual(selection)) {
184-
return "🎯";
185-
}
186-
// Scope target contains selection
187-
if (target.contentRange.contains(selection)) {
188-
return "📦";
189-
}
190-
}
191-
}
192-
193-
return undefined;
194-
}
195-
196169
private getScopeTypesWithSupport(
197170
scopeSupport: ScopeSupport,
198171
): ScopeSupportTreeItem[] {
@@ -251,6 +224,33 @@ export class ScopeTreeProvider implements TreeDataProvider<MyTreeItem> {
251224
});
252225
}
253226

227+
private getIntersectionIcon(
228+
editor: TextEditor,
229+
selection: Selection,
230+
scopeType: ScopeType,
231+
): string | undefined {
232+
const scopes = this.scopeProvider.provideScopeRangesForRange(
233+
editor,
234+
scopeType,
235+
selection,
236+
);
237+
238+
for (const scope of scopes) {
239+
for (const target of scope.targets) {
240+
// Scope target exactly matches selection
241+
if (target.contentRange.isRangeEqual(selection)) {
242+
return "🎯";
243+
}
244+
// Scope target contains selection
245+
if (target.contentRange.contains(selection)) {
246+
return "📦";
247+
}
248+
}
249+
}
250+
251+
return undefined;
252+
}
253+
254254
dispose() {
255255
this.visibleDisposable?.dispose();
256256
}

0 commit comments

Comments
 (0)