look up editor by id, slimmer dtos

This commit is contained in:
Johannes Rieken
2021-03-05 15:54:37 +01:00
parent f7ff53d7b0
commit 68a6f1c30e
3 changed files with 7 additions and 13 deletions

View File

@@ -574,15 +574,9 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
$acceptEditorPropertiesChanged(id: string, data: INotebookEditorPropertiesChangeData): void {
this.logService.debug('ExtHostNotebook#$acceptEditorPropertiesChanged', id, data);
let editor: { editor: ExtHostNotebookEditor; } | undefined;
this._editors.forEach(e => {
if (e.editor.id === id) {
editor = e;
}
});
const editor = this._editors.get(id);
if (!editor) {
return;
throw new Error(`unknown text editor: ${id}`);
}
if (data.visibleRanges) {