1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-12 22:05:54 +01:00

Give the Cmd* and Status* highlight groups slightly higher precedence than their unadorned variants.

This commit is contained in:
Kris Maglione
2010-10-05 20:03:06 -04:00
parent e953ec0801
commit f17790a39a
2 changed files with 23 additions and 3 deletions

View File

@@ -73,11 +73,13 @@ const Highlights = Module("Highlight", {
let old = this.highlight[obj.class];
this.highlight[obj.class] = obj;
// This *must* come before any other property changes.
if (old)
if (old) {
obj.selector = old.selector;
obj.style = old.style;
}
if (/^[>+ ]/.test(obj.selector))
obj.selector = this.selector(obj.class) + obj.selector;
if (/^[[>+ ]/.test(args[1]))
obj.selector = this.selector(obj.class) + args[1];
if (old && old.value != old.default)
obj.value = old.style;