1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 16:17:57 +01:00

Moderately different (and probably jarring) :*usage definition information.

This commit is contained in:
Kris Maglione
2010-12-03 20:35:31 -05:00
parent a7aca30ff1
commit daa0199774
3 changed files with 15 additions and 6 deletions

View File

@@ -232,6 +232,11 @@ const ConfigBase = Class(ModuleBase, {
Keyword color: red; Keyword color: red;
Tag color: blue; Tag color: blue;
Usage
LineInfo
Usage>LineInfo display: none;
Usage:hover>LineInfo display: inline;
!StatusLine color: white !important; background: black !important !StatusLine color: white !important; background: black !important
StatusLineBroken color: black !important; background: #FFa0a0 !important /* light-red */ StatusLineBroken color: black !important; background: #FFa0a0 !important /* light-red */
StatusLineSecure color: black !important; background: #a0a0FF !important /* light-blue */ StatusLineSecure color: black !important; background: #a0a0FF !important /* light-blue */

View File

@@ -148,7 +148,7 @@ const Highlights = Module("Highlight", {
*/ */
selector: function (class_) selector: function (class_)
let (self = this) let (self = this)
class_.replace(/(^|\s)([A-Z]\w+)\b/g, class_.replace(/(^|[>\s])([A-Z]\w+)\b/g,
function (m, n1, hl) n1 + function (m, n1, hl) n1 +
(self.highlight[hl] && self.highlight[hl].class != class_ (self.highlight[hl] && self.highlight[hl].class != class_
? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")), ? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")),

View File

@@ -294,12 +294,16 @@ const Template = Module("Template", {
{ {
this.map(iter, function (item) this.map(iter, function (item)
<tr> <tr>
<td highlight="Title" style="padding-right: 20px">{ <td style="padding-right: 20px" highlight="Usage">{
let (name = item.name || item.names[0], frame = item.definedAt) let (name = item.name || item.names[0], frame = item.definedAt)
frame ? <a xmlns:dactyl={NS} dactyl:command="buffer.viewSource" frame ? <><span highlight="Title">{name}</span>&#xa0;
<span highlight="LineInfo">
Defined at&#xa0;<a xmlns:dactyl={NS} dactyl:command="buffer.viewSource"
href={frame.filename} line={frame.lineNumber} href={frame.filename} line={frame.lineNumber}
title={"Defined at " + frame.filename + ":" + frame.lineNumber} highlight="URL">{
>{name}</a> frame.filename + ":" + frame.lineNumber}</a>
</span>
</>
: name : name
}</td> }</td>
<td>{item.description}</td> <td>{item.description}</td>