diff --git a/content/completion.js b/content/completion.js index cdf5d012..ab21e920 100644 --- a/content/completion.js +++ b/content/completion.js @@ -133,7 +133,6 @@ liberator.Completion = function () //{{{ // TODO: move "nodes" to {muttator,vimperator}.js autocommands: function (filter) { - substrings = []; var nodes = [ ["BrowserExit", "when firefox exits"], ["BrowserRestart", "when firefox restarts"], @@ -153,7 +152,6 @@ liberator.Completion = function () //{{{ dialog: function (filter) { - substrings = []; var nodes = liberator.config.dialogs || []; if (!filter) @@ -241,7 +239,6 @@ liberator.Completion = function () //{{{ url: function (filter, complete) { var completions = []; - substrings = []; var start = 0; var skip = filter.match(/^(.*,\s+)(.*)/); // start after the last ", " @@ -289,11 +286,6 @@ liberator.Completion = function () //{{{ // if "tail" is true, only return names without any directory components file: function (filter, tail) { - // this is now also used as part of the url completion, so the - // substrings shouldn't be cleared for that case - if (!arguments[1]) - substrings = []; - var dir = "", compl = ""; var matches = filter.match(/^(.*[\/\\])?(.*?)$/); if (matches) @@ -359,7 +351,6 @@ liberator.Completion = function () //{{{ command: function (filter) { - substrings = []; var completions = []; if (!filter) @@ -395,7 +386,6 @@ liberator.Completion = function () //{{{ option: function (filter, special, unfiltered) { - substrings = []; var optionCompletions = []; var prefix = filter.match(/^no|inv/) || ""; @@ -419,7 +409,7 @@ liberator.Completion = function () //{{{ if (special) { var prefs = Components.classes["@mozilla.org/preferences-service;1"] - .getService(Components.interfaces.nsIPrefBranch); + .getService(Components.interfaces.nsIPrefBranch); var prefArray = prefs.getChildList("", { value: 0 }); prefArray.sort(); @@ -510,7 +500,6 @@ liberator.Completion = function () //{{{ // FIXME: items shouldn't be [[[a], b]], but [[a, b]] and only mapped if at all for bLCS --mst buffer: function (filter) { - substrings = []; var items = []; var num = getBrowser().browsers.length; var title, url; @@ -547,7 +536,6 @@ liberator.Completion = function () //{{{ sidebar: function (filter) { - substrings = []; var menu = document.getElementById("viewSidebarMenu"); var nodes = []; @@ -566,7 +554,6 @@ liberator.Completion = function () //{{{ javascript: function (str) { - substrings = []; var matches = str.match(/^(.*?)(\s*\.\s*)?(\w*)$/); var objects = []; var filter = matches[3] || ""; @@ -764,6 +751,7 @@ liberator.Completion = function () //{{{ // TODO: get completions for "nested" command lines like ":time :js " or ":tab :he" exTabCompletion: function (str) { + substrings = []; var [count, cmd, special, args] = liberator.commands.parseCommand(str); var completions = []; var start = 0; diff --git a/content/events.js b/content/events.js index ddd6d911..e22435a2 100644 --- a/content/events.js +++ b/content/events.js @@ -1323,7 +1323,7 @@ liberator.Events = function () //{{{ if (!(liberator.modes.extended & liberator.modes.INPUT_MULTILINE)) liberator.commandline.onEvent(event); // reroute event in command line mode } - else // NORMAL mode, no liberator mapping + else if (liberator.mode != liberator.modes.INSERT && liberator.mode != liberator.modes.TEXTAREA) liberator.beep(); } } diff --git a/content/ui.js b/content/ui.js index 2e0115e1..df5ff2ab 100644 --- a/content/ui.js +++ b/content/ui.js @@ -706,9 +706,7 @@ liberator.CommandLine = function () //{{{ if (completionIndex == -1 && !longest) // wrapped around matches, reset command line { if (full && completions.length > 1) - { setCommand(completionPrefix + completionPostfix); - } } else { @@ -728,8 +726,8 @@ liberator.CommandLine = function () //{{{ // Start a new completion in the next iteration. Useful for commands like :source // RFC: perhaps the command can indicate whether the completion should be restarted // Needed for :source to grab another set of completions after a file/directory has been filled out - if (completions.length == 1 && !full) - completionIndex = UNINITIALIZED; + // if (completions.length == 1 && !full) + // completionIndex = UNINITIALIZED; } } // prevent tab from moving to the next field