set value on empty document

This commit is contained in:
Fabian Jakobs 2011-01-19 10:42:27 +01:00
commit e577a7070e

View file

@ -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));
};