MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / _getStartLine

Function _getStartLine

src/rmarkdown/chunks.ts:215–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213 return getChunks(textEditor.document);
214}
215function _getStartLine(): number {
216 const textEditor = vscode.window.activeTextEditor;
217 if (!textEditor) {
218 return 0;
219 }
220 return textEditor.selection.start.line;
221}
222export function isWithinChunk(chunk: RMarkdownChunk, line: number = _getStartLine()): boolean {
223 return (line >= chunk.startLine && line <= chunk.endLine);
224}

Callers 11

isWithinChunkFunction · 0.85
runCurrentChunkFunction · 0.85
runCurrentChunkAndMoveFunction · 0.85
runPreviousChunkFunction · 0.85
runNextChunkFunction · 0.85
runAboveChunksFunction · 0.85
runBelowChunksFunction · 0.85
runCurrentAndBelowChunksFunction · 0.85
goToPreviousChunkFunction · 0.85
goToNextChunkFunction · 0.85
selectCurrentChunkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected