mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
look up editor by id, slimmer dtos
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user