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:
@@ -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)]);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user