mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 11:35:47 +01:00
Don't restrict the length of option/pref completions, just of the string displayed in the completion list.
This commit is contained in:
@@ -984,10 +984,12 @@ var Options = Module("options", {
|
|||||||
if (filter[filter.length - 1] == "=") {
|
if (filter[filter.length - 1] == "=") {
|
||||||
context.advance(filter.length);
|
context.advance(filter.length);
|
||||||
filter = filter.substr(0, filter.length - 1);
|
filter = filter.substr(0, filter.length - 1);
|
||||||
|
|
||||||
|
context.pushProcessor(0, function (item, text, next) next(item, text.substr(0, 100)));
|
||||||
context.completions = [
|
context.completions = [
|
||||||
[prefs.get(filter), "Current Value"],
|
[prefs.get(filter), "Current Value"],
|
||||||
[prefs.getDefault(filter), "Default Value"]
|
[prefs.getDefault(filter), "Default Value"]
|
||||||
].filter(function (k) k[0] != null && String(k[0]).length < 200);
|
].filter(function (k) k[0] != null);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1017,10 +1019,11 @@ var Options = Module("options", {
|
|||||||
if (!opt.value && !opt.operator && !opt.invert) {
|
if (!opt.value && !opt.operator && !opt.invert) {
|
||||||
context.fork("default", 0, this, function (context) {
|
context.fork("default", 0, this, function (context) {
|
||||||
context.title = ["Extra Completions"];
|
context.title = ["Extra Completions"];
|
||||||
|
context.pushProcessor(0, function (item, text, next) next(item, text.substr(0, 100)));
|
||||||
context.completions = [
|
context.completions = [
|
||||||
[option.stringValue, "Current value"],
|
[option.stringValue, "Current value"],
|
||||||
[option.stringDefaultValue, "Default value"]
|
[option.stringDefaultValue, "Default value"]
|
||||||
].filter(function (f) f[0] !== "" && String(f[0]).length < 200);
|
].filter(function (f) f[0] !== "");
|
||||||
context.quote = ["", util.identity, ""];
|
context.quote = ["", util.identity, ""];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user