check for delta.lines

This commit is contained in:
mikedeboer 2011-11-30 18:31:49 +01:00
commit 6e40a7d210

View file

@ -956,11 +956,13 @@ var EditSession = function(text, mode) {
var removedFolds = null; var removedFolds = null;
if (action.indexOf("Lines") != -1) { if (action.indexOf("Lines") != -1) {
if (action == "insertLines") { if (e.data.lines) {
if (action == "insertLines" && e.data.lines) {
lastRow = firstRow + (e.data.lines.length); lastRow = firstRow + (e.data.lines.length);
} else { } else {
lastRow = firstRow; lastRow = firstRow;
} }
}
len = e.data.lines ? e.data.lines.length : lastRow - firstRow; len = e.data.lines ? e.data.lines.length : lastRow - firstRow;
} else { } else {
len = lastRow - firstRow; len = lastRow - firstRow;