Skip to content

Commit fb8965e

Browse files
committed
fix: address missing marker clear path and syntax inconsistencies
Signed-off-by: tirth707 <ptirth2206@gmail.com>
1 parent 4d7a205 commit fb8965e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/editors/ConcertoEditor.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const handleEditorWillMount = (monacoInstance: typeof monaco) => {
7878
});
7979

8080
if (monacoInstance) {
81-
registerAutocompletion('concerto', monacoInstance);
81+
registerAutocompletion("concerto", monacoInstance);
8282
}
8383
};
8484

@@ -113,7 +113,7 @@ export default function ConcertoEditor({ value, onChange }: ConcertoEditorProps)
113113
wordWrap: "on",
114114
automaticLayout: true,
115115
scrollBeyondLastLine: false,
116-
lineNumbers: showLineNumbers ? 'on' : 'off',
116+
lineNumbers: showLineNumbers ? "on" : "off",
117117
autoClosingBrackets: "languageDefined",
118118
autoSurround: "languageDefined",
119119
bracketPairColorization: { enabled: true },
@@ -165,10 +165,13 @@ export default function ConcertoEditor({ value, onChange }: ConcertoEditorProps)
165165
range: new monaco.Range(line, 1, line, 1),
166166
options: {
167167
isWholeLine: true,
168-
className: 'errorLineHighlight',
168+
className: "errorLineHighlight",
169169
}
170170
}
171171
]);
172+
} else {
173+
monacoInstance.editor.setModelMarkers(model, "customMarker", []);
174+
decorationsCollectionRef.current?.clear();
172175
}
173176
} else {
174177
monacoInstance.editor.setModelMarkers(model, "customMarker", []);

0 commit comments

Comments
 (0)