From 23f4a1ef7250396f8fc1c6e0856998c3b048809c Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 29 Apr 2020 11:36:24 -0700 Subject: [PATCH] Fix #96563. --- .../notebook/browser/viewModel/baseCellViewModel.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts b/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts index 63fa4781374..a46f27d754d 100644 --- a/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts +++ b/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.ts @@ -175,7 +175,7 @@ export abstract class BaseCellViewModel extends Disposable implements ICellViewM } detachTextEditor() { - this._editorViewStates = this.saveViewState(); + this.saveViewState(); // decorations need to be cleared first as editors can be resued. this._resolvedDecorations.forEach(value => { let resolvedid = value.id; @@ -201,17 +201,17 @@ export abstract class BaseCellViewModel extends Disposable implements ICellViewM abstract save(): void; - private saveViewState(): editorCommon.ICodeEditorViewState | null { + private saveViewState(): void { if (!this._textEditor) { - return null; + return; } - return this._textEditor.saveViewState(); + this._editorViewStates = this._textEditor.saveViewState(); } saveEditorViewState() { if (this._textEditor) { - this._editorViewStates = this.saveViewState(); + this._editorViewStates = this._textEditor.saveViewState(); } return this._editorViewStates; -- GitLab