提交 23f4a1ef 编写于 作者: R rebornix

Fix #96563.

上级 4a941f2e
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册