fix #1337 bad interaction of removeFolds and updateWrapData

This commit is contained in:
nightwing 2013-03-30 01:39:52 +04:00
commit 4be0153e2b
4 changed files with 29 additions and 6 deletions

View file

@ -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);