"Clear cell output" should clear execution state

#103713
This commit is contained in:
Rob Lourens 2020-08-21 10:49:32 -07:00
parent 6d4ecda76c
commit 2c713dd105

View file

@ -1291,6 +1291,14 @@ registerAction2(class extends NotebookCellAction {
}
editor.viewModel.notebookDocument.clearCellOutput(context.cell.handle);
if (context.cell.metadata && context.cell.metadata?.runState !== NotebookCellRunState.Running) {
context.notebookEditor.viewModel!.notebookDocument.changeCellMetadata(context.cell.handle, {
runState: NotebookCellRunState.Idle,
runStartTime: undefined,
lastRunDuration: undefined,
statusMessage: undefined
});
}
}
});