1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 10:52:27 +01:00

add :set validation and completion for 'eventignore' and 'suggestengines'

This commit is contained in:
Doug Kearns
2008-09-26 05:29:17 +00:00
parent 75d56ccd5d
commit 6eea753fa1
7 changed files with 49 additions and 29 deletions

View File

@@ -47,7 +47,19 @@ liberator.AutoCommands = function () //{{{
liberator.options.add(["eventignore", "ei"],
"List of autocommand event names which should be ignored",
"stringlist", "");
"stringlist", "",
{
completer: function (value) Array(liberator.config.autocommands).push(["all", "All events"]),
validator: function (value)
{
let values = value.split(",");
let events = liberator.config.autocommands.map(function (e) e[0]);
events.push("all");
return values.every(function (event) events.indexOf(event) >= 0);
}
});
liberator.options.add(["focuscontent", "fc"],
"Try to stay in normal mode after loading a web page",