mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-06 15:15:46 +01:00
Fix occasional lingering IGNORE mode after hints.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -445,6 +445,9 @@ var Modes = Module("modes", {
|
||||
},
|
||||
|
||||
push: function push(mainMode, extendedMode, params) {
|
||||
if (this.main == this.IGNORE)
|
||||
this.pop();
|
||||
|
||||
this.set(mainMode, extendedMode, params, { push: this.topOfStack });
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user