1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 07:48:00 +01:00

Pass line/column numbers to the editor for rich text editors too.

This commit is contained in:
Kris Maglione
2011-09-26 00:01:08 -04:00
parent 25d7a2fefd
commit 43cd62d40c
5 changed files with 32 additions and 9 deletions

View File

@@ -796,7 +796,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
};
}
else if (obj instanceof Option) {
tag = spec = function (name) <>'{name}'</>;
spec = function () template.map(obj.names, tag, " ");
tag = function (name) <>'{name}'</>;
link = function (opt, name) <o>{name}</o>;
args = { value: "", values: [] };
}
@@ -819,9 +820,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
res.* += <>
<item>
<tags>{template.map(obj.names.slice().reverse(), tag, " ")}</tags>
<spec>{(obj instanceof Option)
? template.map(obj.names.slice(), spec, " ")
: let (name = (obj.specs || obj.names)[0])
<spec>{let (name = (obj.specs || obj.names)[0])
spec(template.highlightRegexp(tag(name),
/\[(.*?)\]/g,
function (m, n0) <oa>{n0}</oa>),