Skip to content

Commit 43c7f0b

Browse files
committed
Fixes
1 parent b4eed44 commit 43c7f0b

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
@@ -122,7 +122,7 @@ export class CellExecution {
122122
public start(kernelPromise: Promise<IKernel>, notebook: INotebook) {
123123
this.started = true;
124124
// Ensure we clear the cell state and trigger a change.
125-
clearCellForExecution(this.editor, this.cell);
125+
clearCellForExecution(this.cell);
126126
this.cell.metadata.runStartTime = new Date().getTime();
127127
this.stopWatch.reset();
128128
// Changes to metadata must be saved in ipynb, hence mark doc has dirty.
@@ -159,7 +159,7 @@ export class CellExecution {
159159
private completedWithErrors(error: Partial<Error>) {
160160
this.sendPerceivedCellExecute();
161161
this.cell.metadata.lastRunDuration = this.stopWatch.elapsedTime;
162-
updateCellWithErrorStatus(this.editor, this.cell, error);
162+
updateCellWithErrorStatus(this.cell, error);
163163
this.contentProvider.notifyChangesToDocument(this.cell.notebook);
164164
this.errorHandler.handleError((error as unknown) as Error).ignoreErrors();
165165

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)