1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 09:02:27 +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)
{
if (callbacks[type] && callbacks[type][mode])
return callbacks[type][mode].call(this, data);
return false;
callbacks[type][mode].call(this, data);
},
runSilently: function (func, self)
@@ -1280,10 +1279,10 @@ function CommandLine() //{{{
if (completions)
completions.previewClear();
if (!currentExtendedMode)
return true;
return;
// user pressed ENTER to carry out a command
// user pressing ESCAPE is handled in the global onEscape
// user pressed <Enter> to carry out a command
// user pressing <Esc> is handled in the global onEscape
// FIXME: <Esc> should trigger "cancel" event
if (events.isAcceptKey(key))
{
@@ -1291,10 +1290,9 @@ function CommandLine() //{{{
keepCommand = true;
currentExtendedMode = null; // Don't let modes.pop trigger "cancel"
modes.pop(!this.silent);
return commandline.triggerCallback("submit", mode, command);
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))
{
// prevent tab from moving to the next field
@@ -1305,9 +1303,8 @@ function CommandLine() //{{{
history.select(/Up/.test(key), !/(Page|S-)/.test(key));
else
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>")
{
// prevent tab from moving to the next field
@@ -1315,7 +1312,6 @@ function CommandLine() //{{{
event.stopPropagation();
tabTimer.tell(event);
return false;
}
else if (key == "<BS>")
{
@@ -1333,7 +1329,7 @@ function CommandLine() //{{{
{
//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")
{