Skip to content

Commit c2cacf5

Browse files
author
surmon
committed
update to v4.0.5
1 parent be05ec3 commit c2cacf5

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11

22
## CHANGELOG
33

4+
### v4.0.5
5+
6+
Enable switching from/to DiffView based on 'merge' prop status(merge pr 65).
7+
48
### v4.0.4
59

610
optimize events and refresh function.

dist/vue-codemirror.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-codemirror",
33
"description": "CodeMirror component for Vue",
4-
"version": "4.0.4",
4+
"version": "4.0.5",
55
"license": "MIT",
66
"private": false,
77
"author": {

src/codemirror.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
}
8686
},
8787
merge(newVal) {
88-
this.$nextTick(this.switchMerge);
88+
this.$nextTick(this.switchMerge)
8989
},
9090
code(newVal, oldVal) {
9191
this.handerCodeChange(newVal, oldVal)
@@ -185,16 +185,16 @@
185185
},
186186
switchMerge() {
187187
// Save current values
188-
let history = this.cminstance.doc.history;
189-
let cleanGeneration = this.cminstance.doc.cleanGeneration;
190-
this.options.value = this.cminstance.getValue();
188+
const history = this.cminstance.doc.history
189+
const cleanGeneration = this.cminstance.doc.cleanGeneration
190+
this.options.value = this.cminstance.getValue()
191191
192-
this.destroy();
193-
this.initialize();
192+
this.destroy()
193+
this.initialize()
194194
195195
// Restore values
196-
this.cminstance.doc.history = history;
197-
this.cminstance.doc.cleanGeneration = cleanGeneration;
196+
this.cminstance.doc.history = history
197+
this.cminstance.doc.cleanGeneration = cleanGeneration
198198
}
199199
},
200200
mounted() {

0 commit comments

Comments
 (0)