1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 09:07:58 +01:00

Add 'javascript' module. Misc fixes along the way.

This commit is contained in:
Kris Maglione
2009-11-15 02:08:10 -05:00
parent 9937c2965a
commit cdaa26f968
12 changed files with 646 additions and 591 deletions

View File

@@ -470,18 +470,18 @@ const Mappings = Module("mappings", {
[mode.disp.toLowerCase()]);
},
completion: function () {
completion.setFunctionCompleter(mappings.get,
[
null,
function (context, obj, args) {
let mode = args[0];
return util.Array.flatten(
[
[[name, map.description] for ([i, name] in Iterator(map.names))]
for ([i, map] in Iterator(mappings._user[mode].concat(mappings._main[mode])))
]);
}
]);
JavaScript.setCompleter(this.get,
[
null,
function (context, obj, args) {
let mode = args[0];
return util.Array.flatten(
[
[[name, map.description] for ([i, name] in Iterator(map.names))]
for ([i, map] in Iterator(mappings._user[mode].concat(mappings._main[mode])))
]);
}
]);
completion.userMapping = function userMapping(context, args, modes) {
// FIXME: have we decided on a 'standard' way to handle this clash? --djk