1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 04:32:26 +01:00

Move util.identity to the base module.

Most other functions of its ilk live there.
This commit is contained in:
Doug Kearns
2015-06-11 03:10:16 +10:00
parent 6ca1cc3d08
commit 59613afb27
20 changed files with 49 additions and 46 deletions

View File

@@ -777,7 +777,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
completion: function initCompletion() {
completion.register = function complete_register(context) {
context = context.fork("registers");
context.keys = { text: util.identity, description: editor.bound.getRegister };
context.keys = { text: identity, description: editor.bound.getRegister };
context.match = function (r) {
return !this.filter || this.filter.contains(r);
@@ -1413,7 +1413,7 @@ var Editor = Module("editor", XPCOM(Ci.nsIEditActionListener, ModuleBase), {
let res = {};
services.spell.getDictionaryList(res, {});
context.completions = res.value;
context.keys = { text: util.identity, description: util.identity };
context.keys = { text: identity, description: identity };
}
});
},