mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-23 20:03:33 +01:00
Fix :macros.
This commit is contained in:
@@ -260,11 +260,6 @@ const AutoCommands = Module("autocommands", {
|
|||||||
completion.autocmdEvent = function autocmdEvent(context) {
|
completion.autocmdEvent = function autocmdEvent(context) {
|
||||||
context.completions = Iterator(config.autocommands);
|
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: function () {
|
||||||
JavaScript.setCompleter(this.get, [function () Iterator(config.autocommands)]);
|
JavaScript.setCompleter(this.get, [function () Iterator(config.autocommands)]);
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ const Events = Module("events", {
|
|||||||
*/
|
*/
|
||||||
getMacros: function (filter) {
|
getMacros: function (filter) {
|
||||||
let re = RegExp(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)
|
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: function () {
|
||||||
mappings.add(modes.all,
|
mappings.add(modes.all,
|
||||||
["<Esc>", "<C-[>"], "Focus content",
|
["<Esc>", "<C-[>"], "Focus content",
|
||||||
|
|||||||
Reference in New Issue
Block a user