mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-24 22:25:46 +01:00
Add abbreviation hives and fix some apparently long standing abbreviation bugs in the process. :(
This commit is contained in:
@@ -686,9 +686,9 @@ var Commands = Module("commands", {
|
||||
repeat: null,
|
||||
|
||||
add: function () this.builtin._add.apply(this.builtin, arguments),
|
||||
addUserCommand: deprecated("commands.user.add", { get: function addUserCommand() this.user.closure._add }),
|
||||
getUserCommands: deprecated("iter(commands.user)", function getUserCommands() iter(this.user).toArray()),
|
||||
removeUserCommand: deprecated("commands.user.remove", { get: function removeUserCommand() this.user.closure.remove }),
|
||||
addUserCommand: deprecated("group.commands.add", { get: function addUserCommand() this.user.closure._add }),
|
||||
getUserCommands: deprecated("iter(group.commands)", function getUserCommands() iter(this.user).toArray()),
|
||||
removeUserCommand: deprecated("group.commands.remove", { get: function removeUserCommand() this.user.closure.remove }),
|
||||
|
||||
/**
|
||||
* Returns the specified command invocation object serialized to
|
||||
|
||||
@@ -151,7 +151,7 @@ var Contexts = Module("contexts", {
|
||||
memoize(contexts.Group.prototype, name, function () {
|
||||
let group = constructor(this);
|
||||
this.hives.push(group);
|
||||
delete contexts.groups;
|
||||
contexts.flush();
|
||||
return group;
|
||||
});
|
||||
|
||||
@@ -270,6 +270,11 @@ var Contexts = Module("contexts", {
|
||||
|
||||
activeGroups: function (hive) this.initializedGroups().filter(function (g) g.filter(this), this.modules.buffer.uri),
|
||||
|
||||
flush: function flush() {
|
||||
delete this.groups;
|
||||
delete this.allGroups;
|
||||
},
|
||||
|
||||
initializedGroups: function (hive)
|
||||
let (need = hive ? [hive] : Object.keys(this.hives))
|
||||
this.groupList.filter(function (group) need.some(function (name) set.has(group, name))),
|
||||
@@ -295,7 +300,7 @@ var Contexts = Module("contexts", {
|
||||
group.persist = persist;
|
||||
}
|
||||
|
||||
delete this.groups;
|
||||
this.flush();
|
||||
return group;
|
||||
},
|
||||
|
||||
@@ -321,7 +326,7 @@ var Contexts = Module("contexts", {
|
||||
|
||||
delete this.groupMap[name];
|
||||
delete this.hiveProto[name];
|
||||
delete this.groups;
|
||||
this.flush();
|
||||
return group;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user