mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Markers appear for wrong language id. Fixes Microsoft/monaco-editor#111
This commit is contained in:
parent
de4fbdf57e
commit
bfee5d6752
2 changed files with 7 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "monaco-html",
|
||||
"version": "1.1.0-next.2",
|
||||
"version": "1.1.0-next.3",
|
||||
"description": "HTML plugin for the Monaco Editor",
|
||||
"scripts": {
|
||||
"compile": "gulp compile",
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@ export class DiagnostcsAdapter {
|
|||
|
||||
const onModelRemoved = (model: monaco.editor.IModel): void => {
|
||||
monaco.editor.setModelMarkers(model, this._languageId, []);
|
||||
delete this._listener[model.uri.toString()];
|
||||
let uriStr = model.uri.toString();
|
||||
let listener = this._listener[uriStr];
|
||||
if (listener) {
|
||||
listener.dispose();
|
||||
delete this._listener[uriStr];
|
||||
}
|
||||
};
|
||||
|
||||
this._disposables.push(monaco.editor.onDidCreateModel(onModelAdd));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue