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

Function expandToContainingLine

src/util/expandToContainingLine.ts:3–10  ·  view source on GitHub ↗
(
  editor: TextEditor,
  range: Range
)

Source from the content-addressed store, hash-verified

1import { Range, TextEditor } from "vscode";
2
3export default function expandToContainingLine(
4 editor: TextEditor,
5 range: Range
6) {
7 const start = range.start.with({ character: 0 });
8 const end = editor.document.lineAt(range.end).range.end;
9 return new Range(start, end);
10}

Callers 1

getRangesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected