1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 05:27:59 +01:00

Add initial support for stacked key mode handlers.

This commit is contained in:
Kris Maglione
2011-01-18 02:13:16 -05:00
parent 1bef7dbe91
commit 328c78b842
2 changed files with 75 additions and 37 deletions

View File

@@ -597,6 +597,7 @@ var CommandLine = Module("commandline", {
open: function open(prompt, cmd, extendedMode) {
this.widgets.message = null;
this.currentExtendedMode = extendedMode || null;
modes.push(modes.COMMAND_LINE, this.currentExtendedMode, {
autocomplete: cmd.length,
onEvent: this.closure.onEvent,
@@ -608,7 +609,6 @@ var CommandLine = Module("commandline", {
mainMode: this.currentExtendedMode
});
this.currentExtendedMode = extendedMode || null;
this._keepCommand = false;
this.widgets.active.commandline.collapsed = false;
@@ -893,7 +893,7 @@ var CommandLine = Module("commandline", {
commandline.leave(stack);
leave.supercall(this, stack);
},
mainMode: extra.extended || modes.PROMPT
keyModes: [extra.extended, modes.PROMPT]
}));
this.currentExtendedMode = modes.PROMPT;