1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-06 18:05:45 +01:00

Remove unneccesary return statements from commandline.onEvent.

This commit is contained in:
Doug Kearns
2009-08-26 00:46:44 +10:00
parent 94b6cbe5a2
commit 2952c91c74

View File

@@ -991,8 +991,7 @@ function CommandLine() //{{{
triggerCallback: function (type, mode, data) triggerCallback: function (type, mode, data)
{ {
if (callbacks[type] && callbacks[type][mode]) if (callbacks[type] && callbacks[type][mode])
return callbacks[type][mode].call(this, data); callbacks[type][mode].call(this, data);
return false;
}, },
runSilently: function (func, self) runSilently: function (func, self)
@@ -1280,10 +1279,10 @@ function CommandLine() //{{{
if (completions) if (completions)
completions.previewClear(); completions.previewClear();
if (!currentExtendedMode) if (!currentExtendedMode)
return true; return;
// user pressed ENTER to carry out a command // user pressed <Enter> to carry out a command
// user pressing ESCAPE is handled in the global onEscape // user pressing <Esc> is handled in the global onEscape
// FIXME: <Esc> should trigger "cancel" event // FIXME: <Esc> should trigger "cancel" event
if (events.isAcceptKey(key)) if (events.isAcceptKey(key))
{ {
@@ -1291,10 +1290,9 @@ function CommandLine() //{{{
keepCommand = true; keepCommand = true;
currentExtendedMode = null; // Don't let modes.pop trigger "cancel" currentExtendedMode = null; // Don't let modes.pop trigger "cancel"
modes.pop(!this.silent); modes.pop(!this.silent);
commandline.triggerCallback("submit", mode, command);
return commandline.triggerCallback("submit", mode, command);
} }
// user pressed UP or DOWN arrow to cycle history completion // user pressed <Up> or <Down> arrow to cycle history completion
else if (/^(<Up>|<Down>|<S-Up>|<S-Down>|<PageUp>|<PageDown>)$/.test(key)) else if (/^(<Up>|<Down>|<S-Up>|<S-Down>|<PageUp>|<PageDown>)$/.test(key))
{ {
// prevent tab from moving to the next field // prevent tab from moving to the next field
@@ -1305,9 +1303,8 @@ function CommandLine() //{{{
history.select(/Up/.test(key), !/(Page|S-)/.test(key)); history.select(/Up/.test(key), !/(Page|S-)/.test(key));
else else
liberator.beep(); liberator.beep();
return false;
} }
// user pressed TAB to get completions of a command // user pressed <Tab> to get completions of a command
else if (key == "<Tab>" || key == "<S-Tab>") else if (key == "<Tab>" || key == "<S-Tab>")
{ {
// prevent tab from moving to the next field // prevent tab from moving to the next field
@@ -1315,7 +1312,6 @@ function CommandLine() //{{{
event.stopPropagation(); event.stopPropagation();
tabTimer.tell(event); tabTimer.tell(event);
return false;
} }
else if (key == "<BS>") else if (key == "<BS>")
{ {
@@ -1333,7 +1329,7 @@ function CommandLine() //{{{
{ {
//this.resetCompletions(); //this.resetCompletions();
} }
return true; // allow this event to be handled by the host app // allow this event to be handled by the host app
} }
else if (event.type == "keyup") else if (event.type == "keyup")
{ {