mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 15:37:59 +01:00
Long awaited augmentation of the :map command. Surrounding code needs cleanup.
--HG-- extra : rebase_source : 6bb2406343f04aff20456e1a9d0cb595f4ec767d
This commit is contained in:
@@ -696,7 +696,7 @@ const Commands = Module("commands", {
|
||||
if (opt.multiple)
|
||||
args[opt.names[0]] = (args[opt.names[0]] || []).concat(arg);
|
||||
else
|
||||
args[opt.names[0]] = opt.type == this.OPTION_NOARG || arg;
|
||||
args[opt.names[0]] = opt.type == CommandOption.NOARG || arg;
|
||||
|
||||
i += optname.length + count;
|
||||
if (i == str.length)
|
||||
@@ -919,7 +919,7 @@ const Commands = Module("commands", {
|
||||
return;
|
||||
}
|
||||
|
||||
[prefix] = context.filter.match(/^(?:\w*[\s!]|!)\s*/);
|
||||
[prefix] = context.filter.match(/^(?:\w*[\s!])?\s*/);
|
||||
let cmdContext = context.fork(command.name, prefix.length);
|
||||
let argContext = context.fork("args", prefix.length);
|
||||
args = command.parseArgs(cmdContext.filter, argContext, { count: count, bang: bang });
|
||||
|
||||
Reference in New Issue
Block a user