mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 10:08:00 +01:00
Fix coloring of command line with go+=c.
This commit is contained in:
@@ -23,6 +23,7 @@ const CommandWidgets = Class("CommandWidgets", {
|
|||||||
});
|
});
|
||||||
this.addElem({
|
this.addElem({
|
||||||
name: "strut",
|
name: "strut",
|
||||||
|
defaultGroup: "Normal",
|
||||||
getGroup: function () this.commandbar,
|
getGroup: function () this.commandbar,
|
||||||
getValue: function () options.get("guioptions").has("c")
|
getValue: function () options.get("guioptions").has("c")
|
||||||
});
|
});
|
||||||
@@ -107,7 +108,8 @@ const CommandWidgets = Class("CommandWidgets", {
|
|||||||
[this.commandbar, this.statusbar].forEach(function (nodeSet) {
|
[this.commandbar, this.statusbar].forEach(function (nodeSet) {
|
||||||
let elem = nodeSet[obj.name];
|
let elem = nodeSet[obj.name];
|
||||||
if (val != null) {
|
if (val != null) {
|
||||||
highlight.highlightNode(elem, (val[0] != null ? val[0] : obj.defaultGroup)
|
highlight.highlightNode(elem,
|
||||||
|
(val[0] != null ? val[0] : obj.defaultGroup)
|
||||||
.split(/\s/).filter(util.identity)
|
.split(/\s/).filter(util.identity)
|
||||||
.map(function (g) g + " " + nodeSet.group + g)
|
.map(function (g) g + " " + nodeSet.group + g)
|
||||||
.join(" "));
|
.join(" "));
|
||||||
@@ -121,6 +123,13 @@ const CommandWidgets = Class("CommandWidgets", {
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
}).init(obj.name));
|
}).init(obj.name));
|
||||||
|
else if (obj.defaultGroup)
|
||||||
|
[this.commandbar, this.statusbar].forEach(function (nodeSet) {
|
||||||
|
let elem = nodeSet[obj.name];
|
||||||
|
if (elem)
|
||||||
|
highlight.highlightNode(elem, obj.defaultGroup.split(/\s/)
|
||||||
|
.map(function (g) g + " " + nodeSet.group + g).join(" "));
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getGroup: function (name, value) {
|
getGroup: function (name, value) {
|
||||||
if (!statusline.visible)
|
if (!statusline.visible)
|
||||||
|
|||||||
@@ -162,7 +162,8 @@ const ConfigBase = Class(ModuleBase, {
|
|||||||
|
|
||||||
// Hack to give these groups slightly higher precedence
|
// Hack to give these groups slightly higher precedence
|
||||||
// than their unadorned variants.
|
// than their unadorned variants.
|
||||||
//
|
CmdCmdLine;[dactyl|highlight]>*
|
||||||
|
StatusCmdLine;[dactyl|highlight]>*
|
||||||
CmdNormal;[dactyl|highlight]
|
CmdNormal;[dactyl|highlight]
|
||||||
StatusNormal;[dactyl|highlight]
|
StatusNormal;[dactyl|highlight]
|
||||||
CmdErrorMsg;[dactyl|highlight]
|
CmdErrorMsg;[dactyl|highlight]
|
||||||
|
|||||||
Reference in New Issue
Block a user