fix move lines up + unit test
This commit is contained in:
parent
79872cac5d
commit
ba7168156b
2 changed files with 11 additions and 11 deletions
|
|
@ -665,7 +665,7 @@ var Document = function(text, mode) {
|
|||
if (firstRow <= 0) return 0;
|
||||
|
||||
var removed = this.lines.slice(firstRow, lastRow + 1);
|
||||
this.$remove(new Range(firstRow-1, this.lines[firstRow-1], lastRow, this.lines[lastRow].length));
|
||||
this.$remove(new Range(firstRow-1, this.lines[firstRow-1].length, lastRow, this.lines[lastRow].length));
|
||||
this.$insertLines(firstRow - 1, removed);
|
||||
|
||||
this.fireChangeEvent(firstRow - 1, lastRow);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue