diff --git a/src/commandViews.js b/src/commandViews.js index 3c5019b5..6ca82774 100644 --- a/src/commandViews.js +++ b/src/commandViews.js @@ -18,9 +18,8 @@ var CommandPromptView = Backbone.View.extend({ this.blur(); }, this)); - events.on('processCommandFromEvent', _.bind( - this.addToCollection, this - )); + events.on('processCommandFromEvent', this.addToCollection, this); + events.on('submitCommandValueFromEvent', this.submitValue, this); // hacky timeout focus setTimeout(_.bind(function() { @@ -157,7 +156,10 @@ var CommandPromptView = Backbone.View.extend({ submit: function() { var value = this.$('#commandTextField').val().replace('\n', ''); this.clear(); + this.submitValue(value); + }, + submitValue: function(value) { // if we are entering a real command, add it to our history if (value.length) { this.commands.unshift(value); diff --git a/src/main.js b/src/main.js index 243f3711..94eb016c 100644 --- a/src/main.js +++ b/src/main.js @@ -56,6 +56,11 @@ $(document).ready(function(){ $(window).resize(windowResize); windowResize(); setTimeout(windowResize, 50); + + setTimeout(function() { + events.trigger('submitCommandValueFromEvent', "gc; gc; gc; gc; gc; gc; git checkout master^^^^; git commit; git checkout -b another; gc; gc; git rebase master"); + }, 500); + }); function windowResize() {