mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Changes for PR #30
This commit is contained in:
parent
6c73d7f708
commit
6b2271c1c1
9 changed files with 128 additions and 181 deletions
|
|
@ -134,15 +134,16 @@ export class DiagnostcsAdapter extends Adapter {
|
|||
}
|
||||
}
|
||||
});
|
||||
const redoDiagosticsCallback = () => {
|
||||
|
||||
const recomputeDiagostics = () => {
|
||||
// redo diagnostics when options change
|
||||
for (const model of monaco.editor.getModels()) {
|
||||
onModelRemoved(model);
|
||||
onModelAdd(model);
|
||||
}
|
||||
};
|
||||
this._disposables.push(this._defaults.onDidChange(redoDiagosticsCallback));
|
||||
this._disposables.push(this._defaults.onDidExtraLibsChange(redoDiagosticsCallback));
|
||||
this._disposables.push(this._defaults.onDidChange(recomputeDiagostics));
|
||||
this._disposables.push(this._defaults.onDidExtraLibsChange(recomputeDiagostics));
|
||||
|
||||
monaco.editor.getModels().forEach(onModelAdd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue