1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-04 18:14:12 +01:00

Use current group to select :style hive. Clear previous colorscheme's styles on :colo.

--HG--
branch : groups
This commit is contained in:
Kris Maglione
2011-02-05 07:30:46 -05:00
parent 5429db5c53
commit 6ee586087a
5 changed files with 53 additions and 29 deletions

View File

@@ -76,11 +76,11 @@ var Contexts = Module("contexts", {
context: null,
groups: Class.memoize(function () Object.create(Group.groupsProto, {
groups: { value: this.groupList.filter(function (g) g.filter(buffer.uri)) }
groups: { value: this.activeGroups().filter(function (g) g.filter(buffer.uri)) }
})),
allGroups: Class.memoize(function () Object.create(Group.groupsProto, {
groups: { value: this.groupList }
groups: { value: this.activeGroups() }
})),
activeGroups: function (subgroup)
@@ -174,7 +174,19 @@ var Contexts = Module("contexts", {
action.toString = function toString() (type === default_ ? "" : type + " ") + rhs;
args = null;
return action;
}
},
GroupFlag: function (name) ({
names: ["-group", "-g"],
description: "Group to which to add",
type: ArgType("group", function (group) isString(group) ? contexts.getGroup(group, name) : group[name]),
get default() (contexts.context && contexts.context.group || contexts.user)[name],
completer: function (context) completion.group(context)
})
}, {
Context: modules.Script = function Context(file, group, args) {
function Const(val) Class.Property({ enumerable: true, value: val });