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

Merge default.

--HG--
branch : bootstrapped
This commit is contained in:
Kris Maglione
2010-12-25 13:46:58 -05:00
2 changed files with 4 additions and 6 deletions

View File

@@ -551,6 +551,7 @@ const CommandLine = Module("commandline", {
this.widgets.message = null; this.widgets.message = null;
modes.push(modes.COMMAND_LINE, this.currentExtendedMode, { modes.push(modes.COMMAND_LINE, this.currentExtendedMode, {
onEvent: this.closure.onEvent,
leave: function (params) { leave: function (params) {
if (params.pop) if (params.pop)
commandline.leave(); commandline.leave();
@@ -829,6 +830,7 @@ const CommandLine = Module("commandline", {
modes.push(modes.COMMAND_LINE, modes.PROMPT | extra.extended, modes.push(modes.COMMAND_LINE, modes.PROMPT | extra.extended,
update(Object.create(extra), { update(Object.create(extra), {
onEvent: extra.onEvent || this.closure.onEvent,
leave: function leave(stack) { leave: function leave(stack) {
commandline.leave(stack); commandline.leave(stack);
leave.supercall(this, stack); leave.supercall(this, stack);

View File

@@ -1026,11 +1026,11 @@ const Events = Module("events", {
} }
let res = this.onKeyPress(event); let res = this.onKeyPress(event);
if (res === true) if (res === true || res == null)
kill(event); kill(event);
else if (isArray(res)) { else if (isArray(res)) {
if (this.fallthrough) { if (this.fallthrough) {
if (this.fallthrough(res[0]) === true) if (dactyl.trapErrors(this.fallthrough, this, res[0]) === true)
kill(res[0]); kill(res[0]);
} }
else if (Events.isEscape(event)) else if (Events.isEscape(event))
@@ -1040,10 +1040,6 @@ const Events = Module("events", {
dactyl.beep(); dactyl.beep();
kill(event); kill(event);
} }
if (this.main == modes.COMMAND_LINE)
if (!(this.extended & modes.INPUT_MULTILINE))
dactyl.trapErrors(commandline.onEvent, commandline, event);
} }
// Reprocess unconsumed events // Reprocess unconsumed events