We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f63b94 commit c2ef86dCopy full SHA for c2ef86d
1 file changed
src/js/app/CompareController.js
@@ -60,6 +60,21 @@ export default class CompareController {
60
61
const originalModel = monaco.editor.createModel(leftContent, 'json');
62
const modifiedModel = monaco.editor.createModel(rightContent, 'json');
63
+
64
+ originalModel.onDidChangeContent(() => {
65
+ const val = originalModel.getValue();
66
+ if (this.app.editors[0] && this.app.editors[0].getValue() !== val) {
67
+ this.app.editors[0].setValue(val);
68
+ }
69
+ });
70
71
+ modifiedModel.onDidChangeContent(() => {
72
+ const val = modifiedModel.getValue();
73
+ if (this.app.editors[1] && this.app.editors[1].getValue() !== val) {
74
+ this.app.editors[1].setValue(val);
75
76
77
78
this.diffEditor.setModel({
79
original: originalModel,
80
modified: modifiedModel,
0 commit comments