Send text editor properties updates in a single event

This commit is contained in:
Alex Dima
2018-02-26 16:50:13 +01:00
parent ad63cf5a12
commit 6aadb1ad40
5 changed files with 198 additions and 128 deletions

View File

@@ -79,11 +79,8 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape {
private _onTextEditorAdd(textEditor: MainThreadTextEditor): void {
let id = textEditor.getId();
let toDispose: IDisposable[] = [];
toDispose.push(textEditor.onConfigurationChanged((opts) => {
this._proxy.$acceptOptionsChanged(id, opts);
}));
toDispose.push(textEditor.onSelectionChanged((event) => {
this._proxy.$acceptSelectionsChanged(id, event);
toDispose.push(textEditor.onPropertiesChanged((data) => {
this._proxy.$acceptEditorPropertiesChanged(id, data);
}));
this._textEditorsListenersMap[id] = toDispose;