We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da7725c commit 4350263Copy full SHA for 4350263
src/codemirror.vue
@@ -84,6 +84,9 @@
84
}
85
86
},
87
+ merge(newVal) {
88
+ this.$nextTick(this.switchMerge);
89
+ },
90
code(newVal, oldVal) {
91
this.handerCodeChange(newVal, oldVal)
92
@@ -179,6 +182,19 @@
179
182
this.cminstance.setGutterMarker(line, 'breakpoints', info.gutterMarkers ? null : this.marker())
180
183
})
181
184
185
186
+ switchMerge() {
187
+ // Save current values
188
+ let history = this.cminstance.doc.history;
189
+ let cleanGeneration = this.cminstance.doc.cleanGeneration;
190
+ this.options.value = this.cminstance.getValue();
191
+
192
+ this.destroy();
193
+ this.initialize();
194
195
+ // Restore values
196
+ this.cminstance.doc.history = history;
197
+ this.cminstance.doc.cleanGeneration = cleanGeneration;
198
199
200
mounted() {
0 commit comments