mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-25 23:55:44 +01:00
add commandline completion to 'defsearch'
This commit is contained in:
1
NEWS
1
NEWS
@@ -3,6 +3,7 @@
|
|||||||
* version 2.0 (probably)
|
* version 2.0 (probably)
|
||||||
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
|
* IMPORTANT: renamed Startup and Quit autocmd events to VimperatorEnter and
|
||||||
VimperatorLeave respectively
|
VimperatorLeave respectively
|
||||||
|
* add commandline completion to 'defsearch'
|
||||||
* add 'helpfile' option
|
* add 'helpfile' option
|
||||||
* add 'wildignore' option
|
* add 'wildignore' option
|
||||||
* add :finish command
|
* add :finish command
|
||||||
|
|||||||
@@ -100,7 +100,17 @@ liberator.Bookmarks = function () //{{{
|
|||||||
|
|
||||||
liberator.options.add(["defsearch", "ds"],
|
liberator.options.add(["defsearch", "ds"],
|
||||||
"Set the default search engine",
|
"Set the default search engine",
|
||||||
"string", "google");
|
"string", "google",
|
||||||
|
{
|
||||||
|
completer: function (filter)
|
||||||
|
{
|
||||||
|
return liberator.completion.url("", "s")[1];
|
||||||
|
},
|
||||||
|
validator: function (value)
|
||||||
|
{
|
||||||
|
return liberator.completion.url("", "s")[1].some(function (s) s[0] == value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
liberator.options.add(["preload"],
|
liberator.options.add(["preload"],
|
||||||
"Speed up first time history/bookmark completion",
|
"Speed up first time history/bookmark completion",
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ liberator.Options = function () //{{{
|
|||||||
if (option.hasName(filter))
|
if (option.hasName(filter))
|
||||||
{
|
{
|
||||||
if (option.completer)
|
if (option.completer)
|
||||||
return [filter.length + 1, option.completer(filter)];
|
return [filter.length + 1, option.completer(filter)]; // FIXME: filter should be component after "option="
|
||||||
return [filter.length + 1, [[option.value + "", ""]]];
|
return [filter.length + 1, [[option.value + "", ""]]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user