fix moving lines up

This commit is contained in:
Fabian Jakobs 2010-12-14 14:17:52 +01:00
commit 6ad890e71e

View file

@ -664,7 +664,7 @@ var Document = function(text, mode) {
if (firstRow <= 0) return 0;
var removed = this.lines.slice(firstRow, lastRow + 1);
this.$remove(new Range(firstRow, 0, lastRow + 1, 0));
this.$remove(new Range(firstRow-1, this.lines[firstRow-1], lastRow, this.lines[lastRow].length));
this.$insertLines(firstRow - 1, removed);
this.fireChangeEvent(firstRow - 1, lastRow);