Skip to content

Commit 3a3d837

Browse files
committed
Fixes
1 parent 6f38ea9 commit 3a3d837

File tree

4 files changed

+6
-12
lines changed

4 files changed

+6
-12
lines changed

src/client/datascience/jupyter/kernels/cellExecution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export class CellExecution {
124124
public start(kernelPromise: Promise<IKernel>, notebook: INotebook) {
125125
this.started = true;
126126
// Ensure we clear the cell state and trigger a change.
127-
clearCellForExecution(this.editor, this.cell);
127+
clearCellForExecution(this.cell);
128128
this.cell.metadata.runStartTime = new Date().getTime();
129129
this.stopWatch.reset();
130130
// Changes to metadata must be saved in ipynb, hence mark doc has dirty.
@@ -161,7 +161,7 @@ export class CellExecution {
161161
private completedWithErrors(error: Partial<Error>) {
162162
this.sendPerceivedCellExecute();
163163
this.cell.metadata.lastRunDuration = this.stopWatch.elapsedTime;
164-
updateCellWithErrorStatus(this.editor, this.cell, error);
164+
updateCellWithErrorStatus(this.cell, error);
165165
this.contentProvider.notifyChangesToDocument(this.cell.notebook);
166166
this.errorHandler.handleError((error as unknown) as Error).ignoreErrors();
167167

src/client/datascience/notebook/helpers/executionHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export function handleUpdateDisplayDataMessage(
5858
}
5959

6060
const vscCell = document.cells[index];
61-
updateCellOutput(editor, vscCell, changedOutputs);
61+
updateCellOutput(vscCell, changedOutputs);
6262
return true;
6363
}).length > 0
6464
);

src/client/datascience/notebook/helpers/helpers.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ import type {
1313
NotebookCellData,
1414
NotebookCellMetadata,
1515
NotebookData,
16-
NotebookDocument,
17-
NotebookEditor
16+
NotebookDocument
1817
} from 'vscode-proposed';
1918
import { NotebookCellRunState } from '../../../../../typings/vscode-proposed';
2019
import { concatMultilineString, splitMultilineString } from '../../../../datascience-ui/common';
@@ -27,7 +26,6 @@ import { JupyterNotebookView } from '../constants';
2726
// tslint:disable-next-line: no-var-requires no-require-imports
2827
const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed');
2928
// tslint:disable-next-line: no-require-imports
30-
import { url } from 'inspector';
3129
import cloneDeep = require('lodash/cloneDeep');
3230
import { WorkspaceEdit } from 'vscode';
3331
import { isUntitledFile } from '../../../common/utils/misc';

src/client/datascience/notebookStorage/vscNotebookModel.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,8 @@ export class VSCodeNotebookModel extends BaseNotebookModel {
9898
}
9999
public trust() {
100100
super.trust();
101-
const editor =
102-
this.vscodeNotebook && this.document
103-
? this.vscodeNotebook.notebookEditors.find((e) => e.document === this.document)
104-
: undefined;
105-
if (this.document && editor) {
106-
updateVSCNotebookAfterTrustingNotebook(editor, this.document, this._cells);
101+
if (this.document) {
102+
updateVSCNotebookAfterTrustingNotebook(this.document, this._cells);
107103
// We don't need old cells.
108104
this._cells = [];
109105
}

0 commit comments

Comments
 (0)