mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-11 22:05:47 +01:00
Fix silent failure of :set booloption=value.
This commit is contained in:
@@ -759,9 +759,9 @@ const Options = Module("options", {
|
|||||||
*/
|
*/
|
||||||
parseOpt: function parseOpt(args, modifiers) {
|
parseOpt: function parseOpt(args, modifiers) {
|
||||||
let ret = {};
|
let ret = {};
|
||||||
let matches, prefix, postfix, valueGiven;
|
let matches, prefix, postfix;
|
||||||
|
|
||||||
[matches, prefix, ret.name, postfix, valueGiven, ret.operator, ret.value] =
|
[matches, prefix, ret.name, postfix, ret.valueGiven, ret.operator, ret.value] =
|
||||||
args.match(/^\s*(no|inv)?([a-z_.-]*?)([?&!])?\s*(([-+^]?)=(.*))?\s*$/) || [];
|
args.match(/^\s*(no|inv)?([a-z_.-]*?)([?&!])?\s*(([-+^]?)=(.*))?\s*$/) || [];
|
||||||
|
|
||||||
ret.args = args;
|
ret.args = args;
|
||||||
@@ -783,7 +783,7 @@ const Options = Module("options", {
|
|||||||
ret.postfix = postfix;
|
ret.postfix = postfix;
|
||||||
|
|
||||||
ret.all = (ret.name == "all");
|
ret.all = (ret.name == "all");
|
||||||
ret.get = (ret.all || postfix == "?" || (ret.option && ret.option.type != "boolean" && !valueGiven));
|
ret.get = (ret.all || postfix == "?" || (ret.option && ret.option.type != "boolean" && !ret.valueGiven));
|
||||||
ret.invert = (prefix == "inv" || postfix == "!");
|
ret.invert = (prefix == "inv" || postfix == "!");
|
||||||
ret.reset = (postfix == "&");
|
ret.reset = (postfix == "&");
|
||||||
ret.unsetBoolean = (prefix == "no");
|
ret.unsetBoolean = (prefix == "no");
|
||||||
|
|||||||
Reference in New Issue
Block a user