1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 23:42:27 +01:00

I cant sleep.

This commit is contained in:
Kris Maglione
2008-10-02 07:04:31 +00:00
parent c37500251a
commit 9d370cfc89
3 changed files with 17 additions and 14 deletions

View File

@@ -929,15 +929,16 @@ liberator.Editor = function () //{{{
else // list all (for that filter {i,c,!}) else // list all (for that filter {i,c,!})
{ {
var searchFilter = (filter == "!") ? "!ci" : filter + "!"; // ! -> list all, on c or i ! matches too) var searchFilter = (filter == "!") ? "!ci" : filter + "!"; // ! -> list all, on c or i ! matches too)
XML.prettyPrinting = false; XML.prettyPrinting = false;
let list = <></>; let list = <table/>;
for (let tmplhs in abbrev) for (let tmplhs in abbrev)
{ {
abbrev[tmplhs].forEach(function (abbr) abbrev[tmplhs].forEach(function (abbr)
{ {
if (searchFilter.indexOf(abbr[0]) > -1) if (searchFilter.indexOf(abbr[0]) > -1)
{ {
list += <tr> list.* += <tr>
<td>{abbr[0]}</td> <td>{abbr[0]}</td>
<td>{tmplhs}</td> <td>{tmplhs}</td>
<td>{abbr[1]}</td> <td>{abbr[1]}</td>
@@ -946,12 +947,11 @@ liberator.Editor = function () //{{{
}); });
} }
if (!list.length()) if (!list.*.length())
{ {
liberator.echoerr("No abbreviations found"); liberator.echoerr("No abbreviations found");
return; return;
} }
list = <table>{list}</table>
liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE); liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);
} }
}, },

View File

@@ -269,16 +269,19 @@ liberator.Options = function () //{{{
if (!args) if (!args)
{ {
XML.prettyPrinting = false; XML.prettyPrinting = false;
var str = <></>; var str = <table/>
for (let [i, value] in Iterator(liberator.globalVariables)) for (let [i, value] in Iterator(liberator.globalVariables))
{ {
let prefix = typeof value == "number" ? "#" : let prefix = typeof value == "number" ? "#" :
typeof value == "function" ? "*" : typeof value == "function" ? "*" :
" "; " ";
str += <tr><td style="width: 200px;">{i}</td><td>{prefix}{value}</td></tr>; str.* += <tr>
<td style="width: 200px;">{i}</td>
<td>{prefix}{value}</td>
</tr>;
} }
if (str.length()) if (str.*.length())
liberator.echo(<table>{str}</table>, liberator.commandline.FORCE_MULTILINE); liberator.echo(str, liberator.commandline.FORCE_MULTILINE);
else else
liberator.echo("No variables found"); liberator.echo("No variables found");
return; return;

View File

@@ -711,7 +711,7 @@ liberator.Tabs = function () //{{{
{ {
// TODO: move this to liberator.tabs.get() // TODO: move this to liberator.tabs.get()
let items = <></>; let items = <table/>
for (let [i, item] in Iterator(liberator.completion.buffer("")[1])) for (let [i, item] in Iterator(liberator.completion.buffer("")[1]))
{ {
if (i == liberator.tabs.index()) if (i == liberator.tabs.index())
@@ -722,7 +722,7 @@ liberator.Tabs = function () //{{{
indicator = " "; indicator = " ";
let [number, title] = item[0].split(/:\s+/, 2); let [number, title] = item[0].split(/:\s+/, 2);
items += items.* +=
<tr> <tr>
<td align="right"> {number}</td> <td align="right"> {number}</td>
<td><span style="color: blue"> {indicator} </span></td> <td><span style="color: blue"> {indicator} </span></td>