mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-02 01:03:32 +02: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],
|
get command() this.widgets.command[1],
|
||||||
set command(val) this.widgets.command = val,
|
set command(val) this.widgets.command = val,
|
||||||
|
|
||||||
get prompt() this.widgets.prompt,
|
get prompt() this._open ? this.widgets.prompt : this._prompt,
|
||||||
set prompt(val) this.widgets.prompt = val,
|
set prompt(val) {
|
||||||
|
if (this._open)
|
||||||
|
this.widgets.prompt = val;
|
||||||
|
else
|
||||||
|
this._prompt = val;
|
||||||
|
},
|
||||||
|
|
||||||
open: function CM_open(command) {
|
open: function CM_open(command) {
|
||||||
dactyl.assert(isinstance(this.mode, modes.COMMAND_LINE),
|
dactyl.assert(isinstance(this.mode, modes.COMMAND_LINE),
|
||||||
@@ -324,6 +329,8 @@ var CommandMode = Class("CommandMode", {
|
|||||||
this.widgets.prompt = this.prompt;
|
this.widgets.prompt = this.prompt;
|
||||||
this.widgets.command = command || "";
|
this.widgets.command = command || "";
|
||||||
|
|
||||||
|
this._open = true;
|
||||||
|
|
||||||
this.input = this.widgets.active.command.inputField;
|
this.input = this.widgets.active.command.inputField;
|
||||||
if (this.historyKey)
|
if (this.historyKey)
|
||||||
this.history = CommandLine.History(this.input, this.historyKey, this);
|
this.history = CommandLine.History(this.input, this.historyKey, this);
|
||||||
|
|||||||
@@ -445,6 +445,9 @@ var Modes = Module("modes", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
push: function push(mainMode, extendedMode, params) {
|
push: function push(mainMode, extendedMode, params) {
|
||||||
|
if (this.main == this.IGNORE)
|
||||||
|
this.pop();
|
||||||
|
|
||||||
this.set(mainMode, extendedMode, params, { push: this.topOfStack });
|
this.set(mainMode, extendedMode, params, { push: this.topOfStack });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user