From 2952c91c7418e1451cf7a1ec0c08b3e20ce79818 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Wed, 26 Aug 2009 00:46:44 +1000 Subject: [PATCH] Remove unneccesary return statements from commandline.onEvent. --- common/content/ui.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/common/content/ui.js b/common/content/ui.js index 35d3b2e6..b2104264 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -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 to carry out a command + // user pressing is handled in the global onEscape // FIXME: 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 or arrow to cycle history completion else if (/^(|||||)$/.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 to get completions of a command else if (key == "" || key == "") { // prevent tab from moving to the next field @@ -1315,7 +1312,6 @@ function CommandLine() //{{{ event.stopPropagation(); tabTimer.tell(event); - return false; } else if (key == "") { @@ -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") {