mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-05 04:55:46 +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;
|
let option = opt.option;
|
||||||
context.advance(context.filter.indexOf("=") + 1);
|
|
||||||
|
|
||||||
if (!option) {
|
if (!option) {
|
||||||
context.message = "No such option: " + opt.name;
|
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)
|
if (opt.get || opt.reset || !option || prefix)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
@@ -1230,9 +1236,7 @@ var Options = Module("options", {
|
|||||||
let extra = {};
|
let extra = {};
|
||||||
switch (opt.type) {
|
switch (opt.type) {
|
||||||
case "boolean":
|
case "boolean":
|
||||||
if (!completer)
|
return;
|
||||||
completer = function () [["true", ""], ["false", ""]];
|
|
||||||
break;
|
|
||||||
case "regexplist":
|
case "regexplist":
|
||||||
newValues = Option.splitList(context.filter);
|
newValues = Option.splitList(context.filter);
|
||||||
// Fallthrough
|
// Fallthrough
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ function defineModule(name, params) {
|
|||||||
defineModule.loadLog = [];
|
defineModule.loadLog = [];
|
||||||
Object.defineProperty(defineModule.loadLog, "push", {
|
Object.defineProperty(defineModule.loadLog, "push", {
|
||||||
value: function (val) {
|
value: function (val) {
|
||||||
if (false)
|
if (true)
|
||||||
defineModule.dump(val + "\n");
|
defineModule.dump(val + "\n");
|
||||||
this[this.length] = Date.now() + " " + val;
|
this[this.length] = Date.now() + " " + val;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
1.0b4.2:
|
1.0b5pre:
|
||||||
* Extensive Firefox 4 support, including:
|
* Extensive Firefox 4 support, including:
|
||||||
- Fully restartless. Can now be installed, uninstalled,
|
- Fully restartless. Can now be installed, uninstalled,
|
||||||
enabled, disabled, and upgraded without restarting Firefox.
|
enabled, disabled, and upgraded without restarting Firefox.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<Description about="urn:mozilla:install-manifest"
|
<Description about="urn:mozilla:install-manifest"
|
||||||
em:id="pentadactyl@dactyl.googlecode.com"
|
em:id="pentadactyl@dactyl.googlecode.com"
|
||||||
em:name="Pentadactyl"
|
em:name="Pentadactyl"
|
||||||
em:version="1.0b4.2"
|
em:version="1.0b5pre"
|
||||||
em:description="Firefox for Vim and Links addicts"
|
em:description="Firefox for Vim and Links addicts"
|
||||||
em:homepageURL="http://dactyl.sourceforge.net/pentadactyl"
|
em:homepageURL="http://dactyl.sourceforge.net/pentadactyl"
|
||||||
em:iconURL="chrome://pentadactyl/skin/icon.png"
|
em:iconURL="chrome://pentadactyl/skin/icon.png"
|
||||||
|
|||||||
Reference in New Issue
Block a user