mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-01 15:32:27 +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) {
|
||||
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*$/) || [];
|
||||
|
||||
ret.args = args;
|
||||
@@ -783,7 +783,7 @@ const Options = Module("options", {
|
||||
ret.postfix = postfix;
|
||||
|
||||
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.reset = (postfix == "&");
|
||||
ret.unsetBoolean = (prefix == "no");
|
||||
|
||||
Reference in New Issue
Block a user