Skip to content

Commit 7901f65

Browse files
Merge pull request #13414 from sg00dwin/yaml-editor-folding-edit-OCPBUGS-23554
OCPBUGS-23554: Fix for monaco editor that happens with yaml is being edited
2 parents 5a9abcc + e0a620a commit 7901f65

1 file changed

Lines changed: 12 additions & 14 deletions

File tree

frontend/packages/console-shared/src/components/editor/yaml-editor-utils.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -221,20 +221,18 @@ export const enableYAMLValidation = (
221221
tryFolding();
222222
}
223223

224-
setTimeout(() => {
225-
getModel()?.onDidChangeContent(() => {
226-
tryFolding();
227-
228-
const document = createDocument(getModel());
229-
cleanPendingValidation(document);
230-
pendingValidationRequests.set(
231-
document.uri,
232-
setTimeout(() => {
233-
pendingValidationRequests.delete(document.uri);
234-
doValidate(document);
235-
}),
236-
);
237-
});
224+
getModel()?.onDidChangeContent(() => {
225+
tryFolding();
226+
227+
const document = createDocument(getModel());
228+
cleanPendingValidation(document);
229+
pendingValidationRequests.set(
230+
document.uri,
231+
setTimeout(() => {
232+
pendingValidationRequests.delete(document.uri);
233+
doValidate(document);
234+
}),
235+
);
238236
});
239237
};
240238

0 commit comments

Comments
 (0)