Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,14 @@ const BehaviorEditor: React.FC<BehaviorEditorProps> = ({
editor.updateOptions({glyphMargin: true});
}

//FIX: this code block is causing editor content changes to be reverted
// Update content if model already existed but has stale content
// (This handles switching back to a previously-viewed file)
if (!modelChanged && isUsableModel(newModel) && newModel.getValue() !== selectedFile.content) {
isProgrammaticChangeRef.current = true;
applyServerContent(newModel, selectedFile.content);
isProgrammaticChangeRef.current = false;
}
// if (!modelChanged && isUsableModel(newModel) && newModel.getValue() !== selectedFile.content) {
// isProgrammaticChangeRef.current = true;
// applyServerContent(newModel, selectedFile.content);
// isProgrammaticChangeRef.current = false;
// }

// Track that we've applied content for this file
lastAppliedFileIdRef.current = selectedFile.id;
Expand Down
Loading