forked from Botanical/BotanJS
Store the stacks indefinitely
This commit is contained in:
parent
865530709b
commit
44fec5abfd
@ -4,7 +4,9 @@
|
||||
var Recorder = function()
|
||||
{
|
||||
this.__steps = [];
|
||||
this.__stacks = [];
|
||||
this.__i = 0;
|
||||
this.__j = 0;
|
||||
};
|
||||
|
||||
Recorder.prototype.undo = function()
|
||||
@ -31,8 +33,12 @@
|
||||
|
||||
Recorder.prototype.record = function( StateObj )
|
||||
{
|
||||
this.__steps[ this.__i ] = StateObj;
|
||||
StateObj.id = this.__i ++;
|
||||
this.__steps[ this.__i ++ ] = StateObj;
|
||||
this.__stacks[ this.__j ++ ] = StateObj;
|
||||
|
||||
delete this.__steps[ this.__i ];
|
||||
|
||||
StateObj.id = this.__j;
|
||||
};
|
||||
|
||||
ns[ NS_EXPORT ]( EX_CLASS, "Recorder", Recorder );
|
||||
|
@ -4,10 +4,7 @@
|
||||
/** @type {Components.Vim.DateTime} */
|
||||
var RelativeTime = __import( "Components.Vim.DateTime.RelativeTime" );
|
||||
|
||||
var Stack = function()
|
||||
{
|
||||
|
||||
};
|
||||
var Stack = function() { };
|
||||
|
||||
Stack.prototype.store = function( handler )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user