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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user