1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 03:24:12 +01:00

Move template.listCompleter to completion. Some other cleanup/fixes

This commit is contained in:
Kris Maglione
2008-11-25 19:31:51 +00:00
parent 4462bb3768
commit 48172401fa
7 changed files with 51 additions and 76 deletions

View File

@@ -32,23 +32,6 @@ const template = {
return <>{xml}</>;
},
listCompleter: function (name, filter)
{
let context = new CompletionContext(filter || "");
context.fork.apply(context, ["list", 0, completion, name].concat(Array.slice(arguments, 2)));
context = context.contexts["/list"];
while (context.incomplete)
liberator.threadYield(true, true);
let list = this.generic(
<div class="hl-Completions">
{ this.completionRow(context.title, "hl-CompTitle") }
{ template.map(context.items, function (item) context.createRow(item)) }
</div>);
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
},
completionRow: function completionRow(item, class)
{
if (typeof icon == "function")