From 2dd8c8889864036d578926c4fcb765d6bec4f7d2 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 4 Apr 2011 20:39:44 -0400 Subject: [PATCH] Fix beep when starting REPL mode. --- common/content/modes.js | 9 ++++++--- common/modules/javascript.jsm | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common/content/modes.js b/common/content/modes.js index bdac8a26..f9b93625 100644 --- a/common/content/modes.js +++ b/common/content/modes.js @@ -446,19 +446,22 @@ var Modes = Module("modes", { while (this._modeStack.length > 1 && this.main != mode) { let a = this._modeStack.pop(); this.set(this.topOfStack.main, this.topOfStack.extended, this.topOfStack.params, - update({ pop: a }, args || {})); + update({ pop: a }, + args || {})); if (mode == null) return; } }, - replace: function replace(mode, oldMode) { + replace: function replace(mode, oldMode, args) { while (oldMode && this._modeStack.length > 1 && this.main != oldMode) this.pop(); if (this._modeStack.length > 1) - this.set(mode, null, null, { push: this.topOfStack, pop: this._modeStack.pop() }); + this.set(mode, null, null, + update({ push: this.topOfStack, pop: this._modeStack.pop() }, + args || {})); this.push(mode); }, diff --git a/common/modules/javascript.jsm b/common/modules/javascript.jsm index 981ec418..6ff0d5e7 100644 --- a/common/modules/javascript.jsm +++ b/common/modules/javascript.jsm @@ -791,12 +791,12 @@ var JavaScript = Module("javascript", { this.repl = REPL(this.context); }, open: function open(context) { - this.updatePrompt(); modules.mow.echo(this.repl); this.widgets.message = null; open.superapply(this, arguments); + this.updatePrompt(); }, complete: function complete(context) {