From 634a26c98da644871642fcbd15f0aac92ac21918 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 30 Sep 2010 14:54:42 -0400 Subject: [PATCH] Fix :macros. --- common/content/autocommands.js | 5 ----- common/content/events.js | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/common/content/autocommands.js b/common/content/autocommands.js index 47df10ae..fc1b882e 100644 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -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)]); diff --git a/common/content/events.js b/common/content/events.js index 699064e9..d8a80ebd 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -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, ["", ""], "Focus content",