Add removing folds to undo queue.
This commit is contained in:
parent
f695c253f5
commit
a385637b9e
4 changed files with 54 additions and 19 deletions
|
|
@ -66,11 +66,11 @@ var Document = function(text) {
|
|||
this.remove(new Range(0, 0, len, this.getLine(len-1).length));
|
||||
this.insert({row: 0, column:0}, text);
|
||||
};
|
||||
|
||||
|
||||
this.getValue = function() {
|
||||
return this.getAllLines().join(this.getNewLineCharacter());
|
||||
};
|
||||
|
||||
|
||||
this.createAnchor = function(row, column) {
|
||||
return new Anchor(this, row, column);
|
||||
};
|
||||
|
|
@ -382,6 +382,7 @@ var Document = function(text) {
|
|||
this.revertDeltas = function(deltas) {
|
||||
for (var i=deltas.length-1; i>=0; i--) {
|
||||
var delta = deltas[i];
|
||||
|
||||
var range = Range.fromPoints(delta.range.start, delta.range.end);
|
||||
|
||||
if (delta.action == "insertLines")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue