feat(diff-editor): enhance diff editor configuration with legacy algorithm and improved options

This commit is contained in:
purocean
2025-01-09 15:20:32 +08:00
parent 351f97e5c3
commit dc9e4b8780
+8 -1
View File
@@ -321,7 +321,14 @@ async function updateEditor () {
}
if (isDiffEditor) {
editor = monaco.editor.createDiffEditor(refEditor.value, options)
editor = monaco.editor.createDiffEditor(refEditor.value, {
...options,
diffAlgorithm: 'legacy',
ignoreTrimWhitespace: false,
hideUnchangedRegions: {
enabled: true
},
})
} else {
editor = monaco.editor.create(refEditor.value, options)
}