Undo button functionality Issue #40

This commit is contained in:
Peter Cottle 2013-02-20 09:22:15 -08:00
parent e94710ca64
commit c5a3f866ab
9 changed files with 144 additions and 12 deletions

View file

@ -257,6 +257,7 @@ var Level = Sandbox.extend({
initGitShim: function(options) {
// ok we definitely want a shim here
this.gitShim = new GitShim({
beforeCB: _.bind(this.beforeCommandCB, this),
afterCB: _.bind(this.afterCommandCB, this),
afterDeferHandler: _.bind(this.afterCommandDefer, this)
});
@ -283,6 +284,11 @@ var Level = Sandbox.extend({
return myRegexMap;
},
undo: function() {
this.gitCommandsIssued.pop();
Level.__super__.undo.apply(this, arguments);
},
afterCommandCB: function(command) {
var matched = false;
_.each(this.commandsThatCount, function(regex) {