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

Function runCurrentAndBelowChunks

src/rmarkdown/chunks.ts:321–339  ·  view source on GitHub ↗
(chunks: RMarkdownChunk[] = _getChunks(),
    line: number = _getStartLine())

Source from the content-addressed store, hash-verified

319}
320
321export async function runCurrentAndBelowChunks(chunks: RMarkdownChunk[] = _getChunks(),
322 line: number = _getStartLine()): Promise<void> {
323 const currentChunk = getCurrentChunk(chunks, line);
324 if (!currentChunk) {
325 return;
326 }
327 const currentChunkId = currentChunk.id;
328 const lastChunkId = chunks.length;
329
330 const codeRanges: vscode.Range[] = [];
331
332 for (let i = currentChunkId; i <= lastChunkId; i++) {
333 const chunk = chunks.find(e => e.id === i);
334 if (chunk) {
335 codeRanges.push(chunk.codeRange);
336 }
337 }
338 await runChunksInTerm(codeRanges);
339}
340
341export async function runAllChunks(chunks: RMarkdownChunk[] = _getChunks()): Promise<void> {
342

Callers

nothing calls this directly

Calls 4

runChunksInTermFunction · 0.90
_getChunksFunction · 0.85
_getStartLineFunction · 0.85
getCurrentChunkFunction · 0.85

Tested by

no test coverage detected