Skip to content

Commit e577a70

Browse files
committed
set value on empty document
1 parent 6961f37 commit e577a70

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/ace/document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var Document = function(text) {
5656
oop.implement(this, EventEmitter);
5757

5858
this.setValue = function(text) {
59-
this.remove(new Range(0, 0, this.$lines.length, this.$lines[this.$lines.length-1].length));
59+
this.remove(new Range(0, 0, this.$lines.length, this.getLine(this.$lines.length-1).length));
6060
this.insertLines(0, this.$split(text));
6161
};
6262

0 commit comments

Comments
 (0)