Skip to content

Commit 851a0da

Browse files
authored
Merge pull request microsoft#164667 from microsoft/issue163133
Do not interrupt if there are no affected cells
2 parents 09e3248 + f45dffc commit 851a0da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vs/workbench/contrib/notebook/browser/services/notebookExecutionStateServiceImpl.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ class NotebookExecutionListeners extends Disposable {
307307
const implementsInterrupt = kernel.implementsInterrupt;
308308
const handlesToCancel = implementsInterrupt ? [...executingDeletedHandles] : [...executingDeletedHandles, ...pendingDeletedHandles];
309309
this._logService.debug(`NotebookExecution#onWillAddRemoveCells, ${JSON.stringify([...handlesToCancel])}`);
310-
kernel.cancelNotebookCellExecution(this._notebookModel.uri, handlesToCancel);
310+
if (handlesToCancel.length) {
311+
kernel.cancelNotebookCellExecution(this._notebookModel.uri, handlesToCancel);
312+
}
311313
}
312314
}
313315
}

0 commit comments

Comments
 (0)