diff --git a/common/content/buffer.js b/common/content/buffer.js
index 759fe0b4..da1ac020 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -1840,11 +1840,11 @@ var Buffer = Module("buffer", {
"Where to show the destination of the link under the cursor",
"string", "status",
{
- values: [
- ["", "Don't show link destinations"],
- ["status", "Show link destinations in the status line"],
- ["command", "Show link destinations in the command line"]
- ]
+ values: {
+ "": "Don't show link destinations",
+ "status": "Show link destinations in the status line",
+ "command": "Show link destinations in the command line"
+ }
});
options.add(["usermode", "um"],
diff --git a/common/content/hints.js b/common/content/hints.js
index 5183e0a7..e22d79a0 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -1241,9 +1241,10 @@ var Hints = Module("hints", {
"The keys used to label and select hints",
"string", "0123456789",
{
- values: [
- ["0123456789", "Numbers"],
- ["asdfg;lkjh", "Home Row"]],
+ values: {
+ "0123456789": "Numbers",
+ "asdfg;lkjh": "Home Row"
+ },
validator: function (value) {
let values = events.fromString(value).map(events.closure.toString);
return Option.validIf(array.uniq(values).length === values.length,
@@ -1262,24 +1263,24 @@ var Hints = Module("hints", {
"Change the behavior of in hint mode",
"number", 0,
{
- values: [
- ["0", "Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on ."],
- ["1", "Follow the selected hint on ."],
- ["2", "Follow the selected hint on only it's been -selected."]
- ]
+ values: {
+ "0": "Follow the first hint as soon as typed text uniquely identifies it. Follow the selected hint on .",
+ "1": "Follow the selected hint on .",
+ "2": "Follow the selected hint on only it's been -selected."
+ }
});
options.add(["hintmatching", "hm"],
"How hints are filtered",
"stringlist", "contains",
{
- values: [
- ["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."],
- ["custom", "Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)"],
- ["firstletters", "Behaves like wordstartswith, but all groups must match a sequence of words."],
- ["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginnings of words, in order."],
- ["transliterated", UTF8("When true, special latin characters are translated to their ASCII equivalents (e.g., é ⇒ e)")]
- ],
+ values: {
+ "contains": "The typed characters are split on whitespace. The resulting groups must all appear in the hint.",
+ "custom": "Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)",
+ "firstletters": "Behaves like wordstartswith, but all groups must match a sequence of words.",
+ "wordstartswith": "The typed characters are split on whitespace. The resulting groups must all match the beginnings of words, in order.",
+ "transliterated": UTF8("When true, special latin characters are translated to their ASCII equivalents (e.g., é ⇒ e)")
+ },
validator: function (values) Option.validateCompleter.call(this, values) &&
1 === values.reduce(function (acc, v) acc + (["contains", "custom", "firstletters", "wordstartswith"].indexOf(v) >= 0), 0)
});
@@ -1293,11 +1294,11 @@ var Hints = Module("hints", {
"Which text is used to filter hints for input elements",
"stringlist", "label,value",
{
- values: [
- ["value", "Match against the value of the input field"],
- ["label", "Match against the text of a label for the input field, if one can be found"],
- ["name", "Match against the name of the input field"]
- ]
+ values: {
+ "value": "Match against the value of the input field",
+ "label": "Match against the text of a label for the input field, if one can be found",
+ "name": "Match against the name of the input field"
+ }
});
}
});
diff --git a/common/content/tabs.js b/common/content/tabs.js
index 6426c749..00456110 100644
--- a/common/content/tabs.js
+++ b/common/content/tabs.js
@@ -987,11 +987,11 @@ var Tabs = Module("tabs", {
config.tabbrowser.tabContainer._positionPinnedTabs();
return value;
},
- values: [
- ["never", "Never show the tab bar"],
- ["multitab", "Show the tab bar when there are multiple tabs"],
- ["always", "Always show the tab bar"]
- ]
+ values: {
+ "never": "Never show the tab bar",
+ "multitab": "Show the tab bar when there are multiple tabs",
+ "always": "Always show the tab bar"
+ }
});
if (config.hasTabbrowser) {
@@ -1030,15 +1030,15 @@ var Tabs = Module("tabs", {
"Define which commands should output in a new tab by default",
"stringlist", "",
{
- values: [
- ["all", "All commands"],
- ["addons", ":addo[ns] command"],
- ["downloads", ":downl[oads] command"],
- ["extoptions", ":exto[ptions] command"],
- ["help", ":h[elp] command"],
- ["javascript", ":javascript! or :js! command"],
- ["prefs", ":pref[erences]! or :prefs! command"]
- ],
+ values: {
+ "all": "All commands",
+ "addons": ":addo[ns] command",
+ "downloads": ":downl[oads] command",
+ "extoptions": ":exto[ptions] command",
+ "help": ":h[elp] command",
+ "javascript": ":javascript! or :js! command",
+ "prefs": ":pref[erences]! or :prefs! command"
+ },
has: Option.has.toggleAll
});
@@ -1064,11 +1064,11 @@ var Tabs = Module("tabs", {
"See 'popups' option.");
return values;
},
- values: [
- ["tab", "Open popups in a new tab"],
- ["window", "Open popups in a new window"],
- ["resized", "Open resized popups in a new window"]
- ]
+ values: {
+ "tab": "Open popups in a new tab",
+ "window": "Open popups in a new window",
+ "resized": "Open resized popups in a new window"
+ }
});
}
}
diff --git a/common/locale/en-US/developer.xml b/common/locale/en-US/developer.xml
index 8e0602b5..43fb99ed 100644
--- a/common/locale/en-US/developer.xml
+++ b/common/locale/en-US/developer.xml
@@ -102,8 +102,8 @@
&tab;@mode
The mode attribute to <k>. Some keys have different functions in different modes.
You can use this attribute to specify which of the modes (other than Normal) a key pertains to.
- The <value> is prepended to the element's contents, i.e., <k name="C-i" mode="i"/>
- becomes , and <k mode="i">i</k> becomes i.
+ The <value> is prepended to the element's contents, i.e., <k name="C-i" mode="I"/>
+ becomes , and <k mode="t">i</k> becomes i.
Text Edit mode provides basic Vim-like text editing. It can be entered
- from Insert mode by pressing or started directly
+ from Insert mode by pressing or started directly
when a text area is focused if insertmode is unset. See the
index for a list of currently supported
mappings.
diff --git a/common/locale/en-US/hints.xml b/common/locale/en-US/hints.xml
index 0fb2c512..c69849a2 100644
--- a/common/locale/en-US/hints.xml
+++ b/common/locale/en-US/hints.xml
@@ -65,7 +65,7 @@
Start QuickHint mode, but the selected elements
- are clicked with the key pressed,
+ are clicked with the key pressed,
which has the normal effect of opening it in a new tab
(depending on the value of the
browser.tabs.loadInBackground preference).
diff --git a/common/locale/en-US/map.xml b/common/locale/en-US/map.xml
index f83b99b1..9cdb9390 100644
--- a/common/locale/en-US/map.xml
+++ b/common/locale/en-US/map.xml
@@ -37,11 +37,11 @@
For instance,
-:map :echo Date()
+:map :echo Date()
causes “:echo Date()” to be typed out
- whenever is pressed, thus echoing the full date
+ whenever is pressed, thus echoing the full date
to the command line.
@@ -221,15 +221,6 @@
Special arguments
-:map-<silent>
-
-
- When the first argument to one of the mapping commands is
- , the keys in rhs are not shown in the
- command line as they are generated. Nor, for that matter, is
- anything else until the command has completed.
-
-
Below is an overview of which modes each map command applies to:
@@ -262,7 +253,7 @@
quotation marks or back-slashes. A space may additionally be
typed as .
-
+
As special key names start with the < character,
a literal < must be typed as .
@@ -271,8 +262,8 @@
and represent the standard arrow keys.
- , ,
- , , ,
+ , ,
+ , , ,
, and work as
expected.
@@ -280,16 +271,16 @@
or represent the carriage
return key.
-
represents the backspace key.
-
through work as expected.
+
represents the backspace key.
+
through work as expected.
- through represent keys on the
+ through represent keys on the
numeric keypad.
- , where xxxx is any 4 hexadecimal
+ , where xxxx is any 4 hexadecimal
digits, represents the character at that Unicode codepoint.
- For instance, represents ☺.
+ For instance, represents ☺.
@@ -299,10 +290,10 @@
-
: The control or ctrl key.
-
: The alt key.
-
: The meta key, windows key, or command key.
-
: The shift key.
+
: The control or ctrl key.
+
: The alt key.
+
: The meta key, windows key, or command key.
+
: The shift key.
@@ -319,31 +310,31 @@
-
xc
+
xc
Type the ‘X’ key followed by the ‘C’ key.
-
c
+
c
Type the ‘X’ key while holding the ‘Control’ key, followed
by the ‘C’ key.
-
+
Type the ‘2’ while holding the ‘Control’ key.
-
+
Type the ‘@’ key while holding the ‘Control’ key.
-
+
Press the space bar while holding the ‘Shift’ key.
-
+
Type the ‘J’ key while while holding both the ‘Control’ and ‘Alt’ keys.
-
+
Exactly the same as above.
-
+
Type the ‘J’ key while while holding both the ‘Control’, ‘Alt’, and ‘Shift’ keys.
Set the external text editor.
- This is the editor used by , gF, and
+ This is the editor used by , gF, and
other commands which launch an external text editor.
@@ -930,7 +930,7 @@
- TextEdit mode can be entered with from Insert mode.
+ TextEdit mode can be entered with from Insert mode.
diff --git a/common/locale/en-US/privacy.xml b/common/locale/en-US/privacy.xml
index 66092de2..84dafa98 100644
--- a/common/locale/en-US/privacy.xml
+++ b/common/locale/en-US/privacy.xml
@@ -147,7 +147,7 @@
If no action is given, the value of cookies is used.
- :map -bc:cookies
+ :map -bc:cookies
diff --git a/common/locale/en-US/various.xml b/common/locale/en-US/various.xml
index ac5ee93f..78ade2e5 100644
--- a/common/locale/en-US/various.xml
+++ b/common/locale/en-US/various.xml
@@ -261,7 +261,7 @@
Start Caret mode. This mode resembles the Vim's Normal mode where
- the text cursor is visible on the web page. The v key
+ the text cursor is visible on the web page. The v key
enters visual mode, where text is selected as the cursor moves.
diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm
index 6c783966..cc989bf5 100644
--- a/common/modules/commands.jsm
+++ b/common/modules/commands.jsm
@@ -1084,7 +1084,7 @@ var Commands = Module("commands", {
complete.advance(args.completeStart);
complete.keys = {
text: "names",
- description: function (opt) messages.get(["command", params.name, opt.names[0], "description"].join("."), opt.description)
+ description: function (opt) messages.get(["command", params.name, "options", opt.names[0], "description"].join("."), opt.description)
};
complete.title = ["Options"];
if (completeOpts)
diff --git a/common/modules/completion.jsm b/common/modules/completion.jsm
index 1cc24f6f..b7a34e54 100644
--- a/common/modules/completion.jsm
+++ b/common/modules/completion.jsm
@@ -84,6 +84,8 @@ var CompletionContext = Class("CompletionContext", {
*/
self.waitingForTab = false;
+ self.hasItems = null;
+
delete self._generate;
delete self.ignoreCase;
if (self != this)
@@ -329,7 +331,7 @@ var CompletionContext = Class("CompletionContext", {
* The message displayed at the head of the completions for the
* current context.
*/
- get message() this._message || (this.waitingForTab ? "Waiting for " : null),
+ get message() this._message || (this.waitingForTab && this.hasItems !== false ? "Waiting for " : null),
set message(val) this._message = val,
/**
@@ -1014,16 +1016,16 @@ var Completion = Module("completion", {
options: function (dactyl, modules, window) {
const { completion, options } = modules;
let wildmode = {
- values: [
+ values: {
// Why do we need ""?
// Because its description is useful during completion. --Kris
- ["", "Complete only the first match"],
- ["full", "Complete the next full match"],
- ["longest", "Complete the longest common string"],
- ["list", "If more than one match, list all matches"],
- ["list:full", "List all and complete first match"],
- ["list:longest", "List all and complete the longest common string"]
- ],
+ "": "Complete only the first match",
+ "full": "Complete the next full match",
+ "longest": "Complete the longest common string",
+ "list": "If more than one match, list all matches",
+ "list:full": "List all and complete first match",
+ "list:longest": "List all and complete the longest common string"
+ },
checkHas: function (value, val) {
let [first, second] = value.split(":", 2);
return first == val || second == val;
@@ -1056,11 +1058,11 @@ var Completion = Module("completion", {
"Completion case matching mode",
"regexpmap", ".?:smart",
{
- values: [
- ["smart", "Case is significant when capital letters are typed"],
- ["match", "Case is always significant"],
- ["ignore", "Case is never significant"]
- ]
+ values: {
+ "smart": "Case is significant when capital letters are typed",
+ "match": "Case is always significant",
+ "ignore": "Case is never significant"
+ }
});
options.add(["wildmode", "wim"],
diff --git a/common/modules/contexts.jsm b/common/modules/contexts.jsm
index 902d684d..9693e741 100644
--- a/common/modules/contexts.jsm
+++ b/common/modules/contexts.jsm
@@ -288,7 +288,7 @@ var Contexts = Module("contexts", {
initializedGroups: function (hive)
let (need = hive ? [hive] : Object.keys(this.hives))
- this.groupList.filter(function (group) need.some(function (name) set.has(group, name))),
+ this.groupList.filter(function (group) need.some(set.has(group))),
addGroup: function addGroup(name, description, filter, persist, replace) {
let group = this.getGroup(name);
@@ -482,7 +482,7 @@ var Contexts = Module("contexts", {
util.assert(!group.builtin ||
!["-description", "-locations", "-nopersist"]
- .some(function (arg) set.has(args.explicitOpts, arg)),
+ .some(set.has(args.explicitOpts)),
_("group.cantModifyBuiltin"));
},
{
diff --git a/common/modules/finder.jsm b/common/modules/finder.jsm
index a6c84165..a5d60c58 100644
--- a/common/modules/finder.jsm
+++ b/common/modules/finder.jsm
@@ -264,11 +264,11 @@ var RangeFinder = Module("rangefinder", {
"Find case matching mode",
"string", "smart",
{
- values: [
- ["smart", "Case is significant when capital letters are typed"],
- ["match", "Case is always significant"],
- ["ignore", "Case is never significant"]
- ]
+ values: {
+ "smart": "Case is significant when capital letters are typed",
+ "match": "Case is always significant",
+ "ignore": "Case is never significant"
+ }
});
options.add(["incfind", "if"],
diff --git a/common/modules/options.jsm b/common/modules/options.jsm
index 41a8323d..c5a6fa38 100644
--- a/common/modules/options.jsm
+++ b/common/modules/options.jsm
@@ -691,11 +691,13 @@ var Option = Class("Option", {
if (!acceptable)
acceptable = context.allItems.items.map(function (item) [item.text]);
}
- if (this.type === "regexpmap" || this.type === "sitemap")
- return Array.concat(values).every(function (re) acceptable.some(function (item) item[0] == re.result));
if (isArray(acceptable))
acceptable = set(acceptable.map(function ([k]) k));
+
+ if (this.type === "regexpmap" || this.type === "sitemap")
+ return Array.concat(values).every(function (re) set.has(acceptable, re.result));
+
return Array.concat(values).every(set.has(acceptable));
}
});
diff --git a/common/modules/sanitizer.jsm b/common/modules/sanitizer.jsm
index dd18ab27..213f63da 100644
--- a/common/modules/sanitizer.jsm
+++ b/common/modules/sanitizer.jsm
@@ -566,7 +566,7 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
"The default list of private items to sanitize",
"stringlist", "all",
{
- get values() values(sanitizer.itemMap),
+ get values() values(sanitizer.itemMap).toArray(),
has: modules.Option.has.toggleAll,
validator: function (values) values.length &&
values.every(function (val) val === "all" || set.has(sanitizer.itemMap, val))
@@ -604,14 +604,14 @@ var Sanitizer = Module("sanitizer", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakRef
context.compare = context.constructor.Sort.Unsorted;
context.completions = this.values;
},
- values: [
- ["all", "Everything"],
- ["session", "The current session"],
- ["10m", "Last ten minutes"],
- ["1h", "Past hour"],
- ["1d", "Past day"],
- ["1w", "Past week"]
- ],
+ values: {
+ "all": "Everything",
+ "session": "The current session",
+ "10m": "Last ten minutes",
+ "1h": "Past hour",
+ "1d": "Past day",
+ "1w": "Past week"
+ },
validator: function (value) /^(a(ll)?|s(ession)|\d+[mhdw])$/.test(value)
});
diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js
index bea2e6fe..2dd3b532 100644
--- a/pentadactyl/content/config.js
+++ b/pentadactyl/content/config.js
@@ -293,6 +293,7 @@ var Config = Module("config", ConfigBase, {
context.filterFunc = null;
let words = context.filter.toLowerCase().split(/\s+/g);
+ context.hasItems = true;
context.completions = context.completions.filter(function ({ url, title })
words.every(function (w) (url + " " + title).toLowerCase().indexOf(w) >= 0))
context.incomplete = true;
diff --git a/pentadactyl/locale/en-US/intro.xml b/pentadactyl/locale/en-US/intro.xml
index b388c460..bc8bd7fd 100644
--- a/pentadactyl/locale/en-US/intro.xml
+++ b/pentadactyl/locale/en-US/intro.xml
@@ -141,7 +141,7 @@
Visual bell for errors (visualbell)
Marks support (mM to set mark M, 'M to jump to it)
QuickMark support
-
Editing of text fields with an external editor
+
Editing of text fields with an external editor
AutoCommands to execute actions on certain events
A comprehensive help system, explaining all commands, mappings, options, and plugins
Whichever way you choose to indicate your target link, once &dactyl.appName; has
- highlighted the link you want, simply hit to open it.
+ highlighted the link you want, simply hit to open it.