Skip to content

Commit

Permalink
update fetching cells for execution in notebooks (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhakabir committed Apr 5, 2021
1 parent da9c0a7 commit 49ddf44
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,10 @@ export class SampleKernel implements vscode.NotebookKernel {
private _executionOrder = 0;

async executeCellsRequest(document: vscode.NotebookDocument, ranges: vscode.NotebookCellRange[]): Promise<void> {
for (let range of ranges) {
for (let i = range.start; i < range.end; i++) {
let cell = document.cells[i];
const execution = vscode.notebook.createNotebookCellExecutionTask(cell.notebook.uri, cell.index, this.id)!;
await this._doExecution(execution);
for(let range of ranges) {
for(let cell of document.getCells(range)) {
const execution = vscode.notebook.createNotebookCellExecutionTask(cell.notebook.uri, cell.index, this.id)!;
await this._doExecution(execution);
}
}
}
Expand Down

0 comments on commit 49ddf44

Please sign in to comment.