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

Function selectionWithEditorFromPositions

src/util/selectionUtils.ts:34–43  ·  view source on GitHub ↗
(
  selection: SelectionWithEditor,
  start: Position,
  end: Position
)

Source from the content-addressed store, hash-verified

32}
33
34export function selectionWithEditorFromPositions(
35 selection: SelectionWithEditor,
36 start: Position,
37 end: Position
38): SelectionWithEditor {
39 return {
40 editor: selection.editor,
41 selection: selectionFromPositions(selection.selection, start, end),
42 };
43}
44
45/**
46 * Returns a copy of the given typed selection so that the new selection has the new given range

Callers 4

processLineFunction · 0.90
processParagraphFunction · 0.90

Calls 1

selectionFromPositionsFunction · 0.85

Tested by

no test coverage detected