From e577a7070e39be2c340f7b95d13bff581802dc96 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 19 Jan 2011 10:42:27 +0100 Subject: [PATCH] set value on empty document --- 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 492c8050..985e2091 100644 --- a/lib/ace/document.js +++ b/lib/ace/document.js @@ -56,7 +56,7 @@ var Document = function(text) { oop.implement(this, EventEmitter); this.setValue = function(text) { - this.remove(new Range(0, 0, this.$lines.length, this.$lines[this.$lines.length-1].length)); + this.remove(new Range(0, 0, this.$lines.length, this.getLine(this.$lines.length-1).length)); this.insertLines(0, this.$split(text)); };