提交 054cbf4f 编写于 作者: J Johannes Rieken

export onDidChange-event in concat-doc

上级 10655296
......@@ -1671,6 +1671,7 @@ declare module 'vscode' {
}
export interface NotebookConcatTextDocument {
onDidChange: Event<void>;
version: number;
getText(): string;
getText(range: Range): string;
......
......@@ -23,8 +23,8 @@ export class ExtHostNotebookConcatDocument implements vscode.NotebookConcatTextD
private _cellLines!: PrefixSumComputer;
private _versionId = 0;
private readonly _onDidChange = new Emitter<this>();
readonly onDidChange: Event<this> = this._onDidChange.event;
private readonly _onDidChange = new Emitter<void>();
readonly onDidChange: Event<void> = 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);
}
}));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册