mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 10:47:59 +01:00
don't beep in input boxes
This commit is contained in:
@@ -133,7 +133,6 @@ liberator.Completion = function () //{{{
|
|||||||
// TODO: move "nodes" to {muttator,vimperator}.js
|
// TODO: move "nodes" to {muttator,vimperator}.js
|
||||||
autocommands: function (filter)
|
autocommands: function (filter)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var nodes = [
|
var nodes = [
|
||||||
["BrowserExit", "when firefox exits"],
|
["BrowserExit", "when firefox exits"],
|
||||||
["BrowserRestart", "when firefox restarts"],
|
["BrowserRestart", "when firefox restarts"],
|
||||||
@@ -153,7 +152,6 @@ liberator.Completion = function () //{{{
|
|||||||
|
|
||||||
dialog: function (filter)
|
dialog: function (filter)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var nodes = liberator.config.dialogs || [];
|
var nodes = liberator.config.dialogs || [];
|
||||||
|
|
||||||
if (!filter)
|
if (!filter)
|
||||||
@@ -241,7 +239,6 @@ liberator.Completion = function () //{{{
|
|||||||
url: function (filter, complete)
|
url: function (filter, complete)
|
||||||
{
|
{
|
||||||
var completions = [];
|
var completions = [];
|
||||||
substrings = [];
|
|
||||||
|
|
||||||
var start = 0;
|
var start = 0;
|
||||||
var skip = filter.match(/^(.*,\s+)(.*)/); // start after the last ", "
|
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
|
// if "tail" is true, only return names without any directory components
|
||||||
file: function (filter, tail)
|
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 dir = "", compl = "";
|
||||||
var matches = filter.match(/^(.*[\/\\])?(.*?)$/);
|
var matches = filter.match(/^(.*[\/\\])?(.*?)$/);
|
||||||
if (matches)
|
if (matches)
|
||||||
@@ -359,7 +351,6 @@ liberator.Completion = function () //{{{
|
|||||||
|
|
||||||
command: function (filter)
|
command: function (filter)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var completions = [];
|
var completions = [];
|
||||||
|
|
||||||
if (!filter)
|
if (!filter)
|
||||||
@@ -395,7 +386,6 @@ liberator.Completion = function () //{{{
|
|||||||
|
|
||||||
option: function (filter, special, unfiltered)
|
option: function (filter, special, unfiltered)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var optionCompletions = [];
|
var optionCompletions = [];
|
||||||
var prefix = filter.match(/^no|inv/) || "";
|
var prefix = filter.match(/^no|inv/) || "";
|
||||||
|
|
||||||
@@ -419,7 +409,7 @@ liberator.Completion = function () //{{{
|
|||||||
if (special)
|
if (special)
|
||||||
{
|
{
|
||||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Components.interfaces.nsIPrefBranch);
|
.getService(Components.interfaces.nsIPrefBranch);
|
||||||
var prefArray = prefs.getChildList("", { value: 0 });
|
var prefArray = prefs.getChildList("", { value: 0 });
|
||||||
prefArray.sort();
|
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
|
// FIXME: items shouldn't be [[[a], b]], but [[a, b]] and only mapped if at all for bLCS --mst
|
||||||
buffer: function (filter)
|
buffer: function (filter)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var items = [];
|
var items = [];
|
||||||
var num = getBrowser().browsers.length;
|
var num = getBrowser().browsers.length;
|
||||||
var title, url;
|
var title, url;
|
||||||
@@ -547,7 +536,6 @@ liberator.Completion = function () //{{{
|
|||||||
|
|
||||||
sidebar: function (filter)
|
sidebar: function (filter)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var menu = document.getElementById("viewSidebarMenu");
|
var menu = document.getElementById("viewSidebarMenu");
|
||||||
var nodes = [];
|
var nodes = [];
|
||||||
|
|
||||||
@@ -566,7 +554,6 @@ liberator.Completion = function () //{{{
|
|||||||
|
|
||||||
javascript: function (str)
|
javascript: function (str)
|
||||||
{
|
{
|
||||||
substrings = [];
|
|
||||||
var matches = str.match(/^(.*?)(\s*\.\s*)?(\w*)$/);
|
var matches = str.match(/^(.*?)(\s*\.\s*)?(\w*)$/);
|
||||||
var objects = [];
|
var objects = [];
|
||||||
var filter = matches[3] || "";
|
var filter = matches[3] || "";
|
||||||
@@ -764,6 +751,7 @@ liberator.Completion = function () //{{{
|
|||||||
// TODO: get completions for "nested" command lines like ":time :js <tab>" or ":tab :he<tab>"
|
// TODO: get completions for "nested" command lines like ":time :js <tab>" or ":tab :he<tab>"
|
||||||
exTabCompletion: function (str)
|
exTabCompletion: function (str)
|
||||||
{
|
{
|
||||||
|
substrings = [];
|
||||||
var [count, cmd, special, args] = liberator.commands.parseCommand(str);
|
var [count, cmd, special, args] = liberator.commands.parseCommand(str);
|
||||||
var completions = [];
|
var completions = [];
|
||||||
var start = 0;
|
var start = 0;
|
||||||
|
|||||||
@@ -1323,7 +1323,7 @@ liberator.Events = function () //{{{
|
|||||||
if (!(liberator.modes.extended & liberator.modes.INPUT_MULTILINE))
|
if (!(liberator.modes.extended & liberator.modes.INPUT_MULTILINE))
|
||||||
liberator.commandline.onEvent(event); // reroute event in command line mode
|
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();
|
liberator.beep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -706,9 +706,7 @@ liberator.CommandLine = function () //{{{
|
|||||||
if (completionIndex == -1 && !longest) // wrapped around matches, reset command line
|
if (completionIndex == -1 && !longest) // wrapped around matches, reset command line
|
||||||
{
|
{
|
||||||
if (full && completions.length > 1)
|
if (full && completions.length > 1)
|
||||||
{
|
|
||||||
setCommand(completionPrefix + completionPostfix);
|
setCommand(completionPrefix + completionPostfix);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -728,8 +726,8 @@ liberator.CommandLine = function () //{{{
|
|||||||
// Start a new completion in the next iteration. Useful for commands like :source
|
// 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
|
// 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
|
// Needed for :source to grab another set of completions after a file/directory has been filled out
|
||||||
if (completions.length == 1 && !full)
|
// if (completions.length == 1 && !full)
|
||||||
completionIndex = UNINITIALIZED;
|
// completionIndex = UNINITIALIZED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// prevent tab from moving to the next field
|
// prevent tab from moving to the next field
|
||||||
|
|||||||
Reference in New Issue
Block a user