1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 13:42:27 +01:00

Remove ridiculously tortuous mappings code (again).

This commit is contained in:
Kris Maglione
2008-11-28 05:58:58 +00:00
parent 9bbab5ab22
commit 20596df015
2 changed files with 21 additions and 49 deletions

View File

@@ -692,7 +692,9 @@ function Options() //{{{
let scope = modifiers && modifiers.scope || options.OPTION_SCOPE_BOTH;
let opts = (opt for (opt in options)
if ((opt.scope & scope) && (!prefix || opt.type == "boolean" || prefix == "inv" && /list$/.test(opt.type))));
if ((opt.scope & scope) &&
(!prefix || opt.type == "boolean" ||
prefix == "inv" && opt.value instanceof Array)));
if (filter.indexOf("=") == -1)
{
@@ -750,7 +752,7 @@ function Options() //{{{
if (!res)
return;
completions = completions.concat(res);
if (/list$/.test(option.type))
if (option.values instanceof Array)
{
completions = completions.filter(function (val) opt.values.indexOf(val[0]) == -1);
switch (opt.operator)