MCPcopy Create free account
hub / github.com/cursorless-dev/cursorless / runOnTargetsForEachEditor

Function runOnTargetsForEachEditor

src/util/targetUtils.ts:39–44  ·  view source on GitHub ↗
(
  targets: TypedSelection[],
  func: (editor: TextEditor, selections: TypedSelection[]) => Promise<T>
)

Source from the content-addressed store, hash-verified

37}
38
39export async function runOnTargetsForEachEditor<T>(
40 targets: TypedSelection[],
41 func: (editor: TextEditor, selections: TypedSelection[]) => Promise<T>
42): Promise<T[]> {
43 return runForEachEditor(targets, (target) => target.selection.editor, func);
44}
45
46/** Get the possible leading and trailing overflow ranges of the outside target compared to the inside target */
47export function getOutsideOverflow(

Callers 5

runMethod · 0.90
runMethod · 0.90
runMethod · 0.90
runMethod · 0.90

Calls 1

runForEachEditorFunction · 0.85

Tested by

no test coverage detected