1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-03 21:44:11 +01:00

Fix occasional lingering IGNORE mode after hints.

This commit is contained in:
Kris Maglione
2011-08-14 16:57:17 -04:00
parent 8a3c6a7ea3
commit 93bdb3dd42
2 changed files with 12 additions and 2 deletions

View File

@@ -310,8 +310,13 @@ var CommandMode = Class("CommandMode", {
get command() this.widgets.command[1],
set command(val) this.widgets.command = val,
get prompt() this.widgets.prompt,
set prompt(val) this.widgets.prompt = val,
get prompt() this._open ? this.widgets.prompt : this._prompt,
set prompt(val) {
if (this._open)
this.widgets.prompt = val;
else
this._prompt = val;
},
open: function CM_open(command) {
dactyl.assert(isinstance(this.mode, modes.COMMAND_LINE),
@@ -324,6 +329,8 @@ var CommandMode = Class("CommandMode", {
this.widgets.prompt = this.prompt;
this.widgets.command = command || "";
this._open = true;
this.input = this.widgets.active.command.inputField;
if (this.historyKey)
this.history = CommandLine.History(this.input, this.historyKey, this);