mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 07:15:46 +01:00
Fix stringlist option completion.
This commit is contained in:
@@ -437,11 +437,11 @@ const Option = Class("Option", {
|
|||||||
let res = [];
|
let res = [];
|
||||||
Option._splitAt = 0;
|
Option._splitAt = 0;
|
||||||
do {
|
do {
|
||||||
if (count !== undefined)
|
|
||||||
Option._splitAt += count + 1;
|
|
||||||
var [count, arg, quote] = Commands.parseArg(value, /,/, keepQuotes);
|
var [count, arg, quote] = Commands.parseArg(value, /,/, keepQuotes);
|
||||||
Option._quote = quote; // FIXME
|
Option._quote = quote; // FIXME
|
||||||
res.push(arg);
|
res.push(arg);
|
||||||
|
if (value.length > count)
|
||||||
|
Option._splitAt += count + 1;
|
||||||
value = value.slice(count + 1);
|
value = value.slice(count + 1);
|
||||||
} while (value.length);
|
} while (value.length);
|
||||||
return res;
|
return res;
|
||||||
@@ -1395,7 +1395,6 @@ const Options = Module("options", {
|
|||||||
newValues = Option.splitList(context.filter);
|
newValues = Option.splitList(context.filter);
|
||||||
// Fallthrough
|
// Fallthrough
|
||||||
case "stringlist":
|
case "stringlist":
|
||||||
var target = newValues.pop() || "";
|
|
||||||
break;
|
break;
|
||||||
case "stringmap":
|
case "stringmap":
|
||||||
case "regexmap":
|
case "regexmap":
|
||||||
@@ -1406,7 +1405,7 @@ const Options = Module("options", {
|
|||||||
}
|
}
|
||||||
// TODO: Highlight when invalid
|
// TODO: Highlight when invalid
|
||||||
context.advance(Option._splitAt);
|
context.advance(Option._splitAt);
|
||||||
context.filter = target != null ? target : Option.dequote(context.filter);
|
context.filter = Option.dequote(context.filter);
|
||||||
|
|
||||||
context.title = ["Option Value"];
|
context.title = ["Option Value"];
|
||||||
context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""]
|
context.quote = Commands.complQuote[Option._quote] || Commands.complQuote[""]
|
||||||
|
|||||||
Reference in New Issue
Block a user