Skip to content

Commit

Permalink
Make sure the cantEdit flag is reset when setValue is called
Browse files Browse the repository at this point in the history
Closes #5974
  • Loading branch information
marijnh committed Aug 17, 2019
1 parent 5b341e1 commit 19c620b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/model/Doc.js
Expand Up @@ -75,6 +75,7 @@ Doc.prototype = createObj(BranchChunk.prototype, {
let top = Pos(this.first, 0), last = this.first + this.size - 1
makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
text: this.splitLines(code), origin: "setValue", full: true}, true)
this.cantEdit = false
if (this.cm) scrollToCoords(this.cm, 0, 0)
setSelection(this, simpleSelection(top), sel_dontScroll)
}),
Expand Down

0 comments on commit 19c620b

Please sign in to comment.