1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-04-05 04:33:33 +02:00

move the macro completion function to liberator.completion

This commit is contained in:
Doug Kearns
2008-08-20 17:32:52 +00:00
parent 281c6de9e2
commit 387af52369
2 changed files with 191 additions and 191 deletions

View File

@@ -394,16 +394,6 @@ liberator.Events = function () //{{{
return 0;
}
function getMacroCompletions(filter)
{
var macros = [];
var tmp = liberator.events.getMacros();
for (var item in tmp)
macros.push([item, tmp[item]]);
return [0, liberator.completion.filter(macros, filter)];
}
function isFormElemFocused()
{
var elt = window.document.commandDispatcher.focusedElement;
@@ -613,7 +603,7 @@ liberator.Events = function () //{{{
liberator.events.deleteMacros(args);
},
{
completer: function (filter) { return getMacroCompletions(filter); }
completer: function (filter) { return liberator.completion.macro(filter); }
});
liberator.commands.add(["macros"],
@@ -631,7 +621,7 @@ liberator.Events = function () //{{{
liberator.echo(str, liberator.commandline.FORCE_MULTILINE);
},
{
completer: function (filter) { return getMacroCompletions(filter); }
completer: function (filter) { return liberator.completion.macro(filter); }
});
liberator.commands.add(["pl[ay]"],
@@ -644,7 +634,7 @@ liberator.Events = function () //{{{
liberator.events.playMacro(args);
},
{
completer: function (filter) { return getMacroCompletions(filter); }
completer: function (filter) { return liberator.completion.macro(filter); }
});
/////////////////////////////////////////////////////////////////////////////}}}