From caefc819bc4e330024fd032a600e956dbf852cb3 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 16 Feb 2011 23:04:25 -0500 Subject: [PATCH] Clear message before entering command line mode. Closes issue #361. --- common/content/commandline.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common/content/commandline.js b/common/content/commandline.js index 3078810c..74f20bf8 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -308,6 +308,8 @@ var CommandMode = Class("CommandMode", { dactyl.assert(isinstance(this.mode, modes.COMMAND_LINE), "Not opening command line in non-command-line mode."); + + commandline.clearMessage(); modes.push(this.mode, null, this.closure); this.widgets.active.commandline.collapsed = false; @@ -603,8 +605,7 @@ var CommandLine = Module("commandline", { }, clear: function clear() { - if (this.widgets.message && this.widgets.message[1] === this._lastClearable) - this.widgets.message = null; + this.clearMessage(); if (!this.commandSession) { this.widgets.command = null; @@ -618,6 +619,11 @@ var CommandLine = Module("commandline", { mow.visible = false; }, + clearMessage: function clearMessage() { + if (this.widgets.message && this.widgets.message[1] === this._lastClearable) + this.widgets.message = null; + }, + /** * Displays the multi-line output of a command, preceded by the last * executed ex command string.