From 6ad890e71e1cc5a528ea2de22e5e9eb9c742573f Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 14 Dec 2010 14:17:52 +0100 Subject: [PATCH] fix moving lines up --- lib/ace/document.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ace/document.js b/lib/ace/document.js index a705b682..74b5f8df 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -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);