fix #1337 bad interaction of removeFolds and updateWrapData
This commit is contained in:
parent
cf74db8e1d
commit
4be0153e2b
4 changed files with 29 additions and 6 deletions
|
|
@ -1642,6 +1642,7 @@ var EditSession = function(text, mode) {
|
|||
len = lastRow - firstRow;
|
||||
}
|
||||
|
||||
this.$updating = true;
|
||||
if (len != 0) {
|
||||
if (action.indexOf("remove") != -1) {
|
||||
this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
|
||||
|
|
@ -1734,6 +1735,7 @@ var EditSession = function(text, mode) {
|
|||
if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {
|
||||
console.error("doc.getLength() and $wrapData.length have to be the same!");
|
||||
}
|
||||
this.$updating = false;
|
||||
|
||||
if (useWrapMode)
|
||||
this.$updateWrapData(firstRow, lastRow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue