mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 05:57:58 +01:00
Fix :au grouping bug.
This commit is contained in:
@@ -71,7 +71,9 @@ var AutoCommands = Module("autocommands", {
|
|||||||
init: function () {
|
init: function () {
|
||||||
update(this, {
|
update(this, {
|
||||||
hives: contexts.Hives("autocmd", AutoCmdHive),
|
hives: contexts.Hives("autocmd", AutoCmdHive),
|
||||||
user: contexts.hives.autocmd.user
|
user: contexts.hives.autocmd.user,
|
||||||
|
allHives: contexts.allGroups.autocmd,
|
||||||
|
matchingHives: function matchingHives(uri) contexts.matchingGroups(uri).autocmd
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -143,7 +145,7 @@ var AutoCommands = Module("autocommands", {
|
|||||||
let uri = args.url ? util.newURI(args.url) : buffer.uri;
|
let uri = args.url ? util.newURI(args.url) : buffer.uri;
|
||||||
|
|
||||||
event = event.toLowerCase();
|
event = event.toLowerCase();
|
||||||
for (let hive in this.hives.iterValues()) {
|
for (let hive in values(this.matchingHives(uri))) {
|
||||||
let args = update({},
|
let args = update({},
|
||||||
hive.argsExtra(arguments[1]),
|
hive.argsExtra(arguments[1]),
|
||||||
arguments[1]);
|
arguments[1]);
|
||||||
|
|||||||
@@ -265,15 +265,17 @@ var Contexts = Module("contexts", {
|
|||||||
return frame;
|
return frame;
|
||||||
},
|
},
|
||||||
|
|
||||||
groups: Class.memoize(function () Object.create(this.groupsProto, {
|
groups: Class.memoize(function () this.matchingGroups(this.modules.buffer.uri)),
|
||||||
groups: { value: this.activeGroups() },
|
|
||||||
})),
|
|
||||||
|
|
||||||
allGroups: Class.memoize(function () Object.create(this.groupsProto, {
|
allGroups: Class.memoize(function () Object.create(this.groupsProto, {
|
||||||
groups: { value: this.initializedGroups() }
|
groups: { value: this.initializedGroups() }
|
||||||
})),
|
})),
|
||||||
|
|
||||||
activeGroups: function (hive) this.initializedGroups().filter(function (g) g.filter(this), this.modules.buffer.uri),
|
matchingGroups: function (uri) Object.create(this.groupsProto, {
|
||||||
|
groups: { value: this.activeGroups(uri) },
|
||||||
|
}),
|
||||||
|
|
||||||
|
activeGroups: function (uri) this.initializedGroups().filter(function (g) g.filter(this), uri || this.modules.buffer.uri),
|
||||||
|
|
||||||
flush: function flush() {
|
flush: function flush() {
|
||||||
delete this.groups;
|
delete this.groups;
|
||||||
|
|||||||
Reference in New Issue
Block a user