mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 17:32:41 +00:00
re #139541.
This commit is contained in:
parent
e8a26d3ebf
commit
3a73bf805c
|
@ -181,11 +181,13 @@ class NotebookCellPausing extends Disposable implements IWorkbenchContribution {
|
|||
internalMetadata.didPause = true;
|
||||
}
|
||||
|
||||
notebookModel?.applyEdits([{
|
||||
editType: CellEditType.PartialInternalMetadata,
|
||||
handle: parsed.handle,
|
||||
internalMetadata,
|
||||
}], true, undefined, () => undefined, undefined);
|
||||
if (notebookModel?.checkCellExistence(parsed.handle)) {
|
||||
notebookModel?.applyEdits([{
|
||||
editType: CellEditType.PartialInternalMetadata,
|
||||
handle: parsed.handle,
|
||||
internalMetadata,
|
||||
}], true, undefined, () => undefined, undefined);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,6 +381,10 @@ export class NotebookTextModel extends Disposable implements INotebookTextModel
|
|||
return this.cells.findIndex(c => !!c.outputs.find(o => o.outputId === outputId));
|
||||
}
|
||||
|
||||
checkCellExistence(handle: number) {
|
||||
return this._cellListeners.has(handle);
|
||||
}
|
||||
|
||||
reset(cells: ICellDto2[], metadata: NotebookDocumentMetadata, transientOptions: TransientOptions): void {
|
||||
this.transientOptions = transientOptions;
|
||||
this._cellhandlePool = 0;
|
||||
|
|
Loading…
Reference in a new issue