MCPcopy Index your code
hub / github.com/cursorless-dev/cursorless / simpleSelectionExtractor

Function simpleSelectionExtractor

src/util/nodeSelectors.ts:45–56  ·  view source on GitHub ↗
(
  editor: TextEditor,
  node: SyntaxNode
)

Source from the content-addressed store, hash-verified

43}
44
45export function simpleSelectionExtractor(
46 editor: TextEditor,
47 node: SyntaxNode
48): SelectionWithContext {
49 return {
50 selection: new Selection(
51 new Position(node.startPosition.row, node.startPosition.column),
52 new Position(node.endPosition.row, node.endPosition.column)
53 ),
54 context: {},
55 };
56}
57
58/**
59 * Extracts a selection from the first node to the second node.

Callers 3

typeMatcherFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected