mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 00:52:27 +01:00
Wrap long option values in :set output. Closes issue #84.
--HG-- extra : rebase_source : b6346cff93828af6c22b19bbd65ac5cf20b7e72d
This commit is contained in:
@@ -188,7 +188,8 @@ const ConfigBase = Class(ModuleBase, {
|
||||
StatusModeMsg color: inherit !important; background: inherit !important; padding-right: 1em;
|
||||
MoreMsg color: green !important; background: white !important;
|
||||
StatusMoreMsg background: inherit !important;
|
||||
Message white-space: normal; min-width: 100%; padding-left: 2em; text-indent: -2em; display: block;
|
||||
Message white-space: pre-wrap !important; min-width: 100%; width: 100%; padding-left: 4em; text-indent: -4em; display: block;
|
||||
!Message String white-space: pre-wrap;
|
||||
NonText color: blue; min-height: 16px; padding-left: 2px;
|
||||
*Preview color: gray;
|
||||
Question color: green !important; background: white !important; font-weight: bold !important;
|
||||
|
||||
@@ -893,7 +893,7 @@ const Options = Module("options", {
|
||||
if (options["verbose"] > 0 && option.setFrom)
|
||||
msg += "\n Last set from " + option.setFrom;
|
||||
|
||||
dactyl.echo(<span highlight="CmdOutput">{msg}</span>);
|
||||
dactyl.echo(<span highlight="CmdOutput Message">{msg}</span>);
|
||||
}
|
||||
}
|
||||
// write access
|
||||
|
||||
@@ -147,13 +147,11 @@ const Highlights = Module("Highlight", {
|
||||
*
|
||||
* @param {string} class
|
||||
*/
|
||||
selector: function (class_) {
|
||||
let [, hl, rest] = class_.match(/^(\w*)(.*)/);
|
||||
let pattern = "[dactyl|highlight~=" + hl + "]";
|
||||
if (this.highlight[hl] && this.highlight[hl].class != class_)
|
||||
pattern = this.highlight[hl].selector;
|
||||
return pattern + rest;
|
||||
},
|
||||
selector: function (class_)
|
||||
class_.replace(/(^|\s)([A-Z]\w+)\b/g,
|
||||
function (m, n1, hl) n1 +
|
||||
(this.highlight[hl] && this.highlight[hl].class != class_
|
||||
? this.highlight[hl] : "[dactyl|highlight~=" + hl + "]")),
|
||||
|
||||
/**
|
||||
* Clears all highlighting rules. Rules with default values are
|
||||
|
||||
@@ -234,8 +234,10 @@ const Template = Module("Template", {
|
||||
this.map(opts, function (opt)
|
||||
<tr>
|
||||
<td>
|
||||
<span style={opt.isDefault ? "" : "font-weight: bold"}>{opt.pre}{opt.name}</span><span>{opt.value}</span>
|
||||
{opt.isDefault || opt.default == null ? "" : <span class="extra-info"> (default: {opt.default})</span>}
|
||||
<div highlight="Message"
|
||||
><span style={opt.isDefault ? "" : "font-weight: bold"}>{opt.pre}{opt.name}</span><span>{opt.value}</span>{
|
||||
opt.isDefault || opt.default == null ? "" : <span class="extra-info"> (default: {opt.default})</span>
|
||||
}</div>
|
||||
</td>
|
||||
</tr>)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user