1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 23:57:59 +01:00

Move the standard type completers to appropriate modules.

This commit is contained in:
Doug Kearns
2009-06-18 20:46:09 +10:00
parent 561ed5fc3e
commit ec8d7686fc
14 changed files with 680 additions and 625 deletions

View File

@@ -297,6 +297,23 @@ function Mappings() //{{{
[m.mask for (m in modes.mainModes) if (m.char == mode.char)],
[mode.disp.toLowerCase()]);
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// COMPLETIONS /////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
liberator.registerObserver("load_completion", function () {
completion.userMapping = function userMapping(context, args, modes) {
// FIXME: have we decided on a 'standard' way to handle this clash? --djk
modes = modes || [modules.modes.NORMAL];
if (args.completeArg == 0)
{
let maps = [[m.names[0], ""] for (m in mappings.getUserIterator(modes))];
context.completions = maps;
}
};
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{