set value on empty document
This commit is contained in:
parent
6961f375a6
commit
e577a7070e
1 changed files with 1 additions and 1 deletions
|
|
@ -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));
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue