From 054cbf4f241ebb2e5996e0ca5309aae8130983da Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 21 Apr 2020 12:18:05 +0200 Subject: [PATCH] export onDidChange-event in concat-doc --- src/vs/vscode.proposed.d.ts | 1 + .../workbench/api/common/extHostNotebookConcatDocument.ts | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index b25973d0cb0..0c534c0dbe6 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1671,6 +1671,7 @@ declare module 'vscode' { } export interface NotebookConcatTextDocument { + onDidChange: Event; version: number; getText(): string; getText(range: Range): string; diff --git a/src/vs/workbench/api/common/extHostNotebookConcatDocument.ts b/src/vs/workbench/api/common/extHostNotebookConcatDocument.ts index fc86657861c..60e87eca726 100644 --- a/src/vs/workbench/api/common/extHostNotebookConcatDocument.ts +++ b/src/vs/workbench/api/common/extHostNotebookConcatDocument.ts @@ -23,8 +23,8 @@ export class ExtHostNotebookConcatDocument implements vscode.NotebookConcatTextD private _cellLines!: PrefixSumComputer; private _versionId = 0; - private readonly _onDidChange = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; + private readonly _onDidChange = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; constructor( extHostNotebooks: ExtHostNotebookController, @@ -40,14 +40,14 @@ export class ExtHostNotebookConcatDocument implements vscode.NotebookConcatTextD this._cellLengths.changeValue(cellIdx, this._cells[cellIdx].document.getText().length + 1); this._cellLines.changeValue(cellIdx, this._cells[cellIdx].document.lineCount); this._versionId += 1; - this._onDidChange.fire(this); + this._onDidChange.fire(undefined); } })); this._disposables.add(extHostNotebooks.onDidChangeNotebookDocument(e => { if (e.document === this._notebook) { this._init(); this._versionId += 1; - this._onDidChange.fire(this); + this._onDidChange.fire(undefined); } })); } -- GitLab