1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-25 15:32:28 +01:00

Return all abbreviations, by default, from the abbreviation completer.

Fixes :command -complete=abbreviation
This commit is contained in:
Doug Kearns
2010-11-10 11:28:09 +11:00
parent 21e677346d
commit d23b43d963

View File

@@ -216,8 +216,9 @@ const Abbreviations = Module("abbreviations", {
}, {
completion: function () {
completion.abbreviation = function abbreviation(context, modes) {
let abbrevs = abbreviations.merged.filter(function (abbr) abbr.inModes(modes));
context.completions = [[abbr.lhs, abbr.rhs] for ([, abbr] in Iterator(abbrevs))];
let fn = modes ? function (abbr) abbr.inModes(modes) : util.identity;
context.keys = { text: "lhs" , description: "rhs" };
context.completions = abbreviations.merged.filter(fn);
};
},