mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 07:05:46 +01:00
Give the Cmd* and Status* highlight groups slightly higher precedence than their unadorned variants.
This commit is contained in:
@@ -160,6 +160,24 @@ const ConfigBase = Class(ModuleBase, {
|
|||||||
Enabled color: blue;
|
Enabled color: blue;
|
||||||
Disabled color: red;
|
Disabled color: red;
|
||||||
|
|
||||||
|
// Hack to give these groups slightly higher precedence
|
||||||
|
// than their unadorned variants.
|
||||||
|
//
|
||||||
|
CmdNormal;[dactyl|highlight]
|
||||||
|
StatusNormal;[dactyl|highlight]
|
||||||
|
CmdErrorMsg;[dactyl|highlight]
|
||||||
|
StatusErrorMsg;[dactyl|highlight]
|
||||||
|
CmdInfoMsg;[dactyl|highlight]
|
||||||
|
StatusInfoMsg;[dactyl|highlight]
|
||||||
|
CmdModeMsg;[dactyl|highlight]
|
||||||
|
StatusModeMsg;[dactyl|highlight]
|
||||||
|
CmdMoreMsg;[dactyl|highlight]
|
||||||
|
StatusMoreMsg;[dactyl|highlight]
|
||||||
|
CmdQuestion;[dactyl|highlight]
|
||||||
|
StatusQuestion;[dactyl|highlight]
|
||||||
|
CmdWarningMsg;[dactyl|highlight]
|
||||||
|
StatusWarningMsg;[dactyl|highlight]
|
||||||
|
|
||||||
!Normal color: black !important; background: white !important; font-weight: normal !important;
|
!Normal color: black !important; background: white !important; font-weight: normal !important;
|
||||||
!StatusNormal color: inherit !important; background: inherit !important;
|
!StatusNormal color: inherit !important; background: inherit !important;
|
||||||
ErrorMsg color: white !important; background: red !important; font-weight: bold !important;
|
ErrorMsg color: white !important; background: red !important; font-weight: bold !important;
|
||||||
|
|||||||
@@ -73,11 +73,13 @@ const Highlights = Module("Highlight", {
|
|||||||
let old = this.highlight[obj.class];
|
let old = this.highlight[obj.class];
|
||||||
this.highlight[obj.class] = obj;
|
this.highlight[obj.class] = obj;
|
||||||
// This *must* come before any other property changes.
|
// This *must* come before any other property changes.
|
||||||
if (old)
|
if (old) {
|
||||||
|
obj.selector = old.selector;
|
||||||
obj.style = old.style;
|
obj.style = old.style;
|
||||||
|
}
|
||||||
|
|
||||||
if (/^[>+ ]/.test(obj.selector))
|
if (/^[[>+ ]/.test(args[1]))
|
||||||
obj.selector = this.selector(obj.class) + obj.selector;
|
obj.selector = this.selector(obj.class) + args[1];
|
||||||
if (old && old.value != old.default)
|
if (old && old.value != old.default)
|
||||||
obj.value = old.style;
|
obj.value = old.style;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user