1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 19:04:11 +01:00

Don't offer value completions for boolean options. Fix spellcheck highlighting of invalid option names. Closes issue #209.

This commit is contained in:
Kris Maglione
2010-12-31 21:33:44 -05:00
parent 937d7ff3af
commit 0d6e0a1d6b
4 changed files with 13 additions and 9 deletions

View File

@@ -1006,13 +1006,19 @@ var Options = Module("options", {
}
let option = opt.option;
context.advance(context.filter.indexOf("=") + 1);
if (!option) {
context.message = "No such option: " + opt.name;
context.highlight(0, name.length, "SPELLCHECK");
context.highlight(0, opt.name.length, "SPELLCHECK");
}
context.advance(context.filter.indexOf("="));
if (option.type == "boolean") {
context.message = "Trailing characters";
context.highlight(0, context.filter.length, "SPELLCHECK");
return;
}
context.advance(1);
if (opt.get || opt.reset || !option || prefix)
return null;
@@ -1230,9 +1236,7 @@ var Options = Module("options", {
let extra = {};
switch (opt.type) {
case "boolean":
if (!completer)
completer = function () [["true", ""], ["false", ""]];
break;
return;
case "regexplist":
newValues = Option.splitList(context.filter);
// Fallthrough

View File

@@ -160,7 +160,7 @@ function defineModule(name, params) {
defineModule.loadLog = [];
Object.defineProperty(defineModule.loadLog, "push", {
value: function (val) {
if (false)
if (true)
defineModule.dump(val + "\n");
this[this.length] = Date.now() + " " + val;
}

View File

@@ -1,4 +1,4 @@
1.0b4.2:
1.0b5pre:
* Extensive Firefox 4 support, including:
- Fully restartless. Can now be installed, uninstalled,
enabled, disabled, and upgraded without restarting Firefox.

View File

@@ -4,7 +4,7 @@
<Description about="urn:mozilla:install-manifest"
em:id="pentadactyl@dactyl.googlecode.com"
em:name="Pentadactyl"
em:version="1.0b4.2"
em:version="1.0b5pre"
em:description="Firefox for Vim and Links addicts"
em:homepageURL="http://dactyl.sourceforge.net/pentadactyl"
em:iconURL="chrome://pentadactyl/skin/icon.png"