Add removing folds to undo queue.

This commit is contained in:
Julian Viereck 2011-04-28 21:01:09 +02:00
commit a385637b9e
4 changed files with 54 additions and 19 deletions

View file

@ -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")