We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7f9396 commit 6345b0aCopy full SHA for 6345b0a
src/components/CodeEditor/CodeEditor.tsx
@@ -201,6 +201,17 @@ function CodeEditor({
201
}
202
}, [theme]);
203
204
+ // Clear markers when switching projects or languages
205
+ useEffect(() => {
206
+ if (monacoRef.current && editorRef.current) {
207
+ const model = editorRef.current.getModel();
208
+ if (model) {
209
+ // Clear all markers for this model
210
+ monacoRef.current.editor.setModelMarkers(model, 'owner', []);
211
+ }
212
213
+ }, [value, language]);
214
+
215
// Cleanup on unmount
216
useEffect(() => {
217
return () => {
0 commit comments