1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-05 19:25:46 +01:00

Fix :macros.

This commit is contained in:
Kris Maglione
2010-09-30 14:54:42 -04:00
parent 0cf2bc9cb8
commit 634a26c98d
2 changed files with 7 additions and 6 deletions

View File

@@ -260,11 +260,6 @@ const AutoCommands = Module("autocommands", {
completion.autocmdEvent = function autocmdEvent(context) {
context.completions = Iterator(config.autocommands);
};
completion.macro = function macro(context) {
context.title = ["Macro", "Keys"];
context.completions = [item for (item in events.getMacros())];
};
},
javascript: function () {
JavaScript.setCompleter(this.get, [function () Iterator(config.autocommands)]);

View File

@@ -204,7 +204,7 @@ const Events = Module("events", {
*/
getMacros: function (filter) {
let re = RegExp(filter || "");
return ([k, m.keys] for ([k, m] in this._macros) if (re.test(macro)));
return ([k, m.keys] for ([k, m] in events._macros) if (re.test(k)));
},
/**
@@ -1105,6 +1105,12 @@ const Events = Module("events", {
completer: function (context) completion.macro(context)
});
},
completion: function () {
completion.macro = function macro(context) {
context.title = ["Macro", "Keys"];
context.completions = [item for (item in events.getMacros())];
};
},
mappings: function () {
mappings.add(modes.all,
["<Esc>", "<C-[>"], "Focus content",