(chunks: RMarkdownChunk[] = _getChunks(),
line: number = _getStartLine())
| 382 | } |
| 383 | |
| 384 | export function selectCurrentChunk(chunks: RMarkdownChunk[] = _getChunks(), |
| 385 | line: number = _getStartLine()): void { |
| 386 | const editor = vscode.window.activeTextEditor; |
| 387 | const currentChunk = getCurrentChunk(chunks, line); |
| 388 | if (!editor || !currentChunk || !isWithinChunk(currentChunk, line)) { |
| 389 | return; |
| 390 | } |
| 391 | const lines = editor.document.getText().split(/\r?\n/); |
| 392 | |
| 393 | editor.selection = new vscode.Selection( |
| 394 | currentChunk.startLine, 0, |
| 395 | currentChunk.endLine, lines[currentChunk.endLine].length |
| 396 | ); |
| 397 | } |
| 398 | |
| 399 | export function getCodeLenses(chunks: RMarkdownChunk[], token: vscode.CancellationToken): vscode.CodeLens[] { |
| 400 |
nothing calls this directly
no test coverage detected