mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 16:32:27 +01:00
simplify messages list generation in :messages
This commit is contained in:
@@ -508,20 +508,11 @@ liberator.CommandLine = function () //{{{
|
|||||||
"Display previously given messages",
|
"Display previously given messages",
|
||||||
function ()
|
function ()
|
||||||
{
|
{
|
||||||
// TODO: the MOW<->command-line disjoint is really annoying
|
// TODO: color messages
|
||||||
if (messageHistory.length == 1)
|
let list = messageHistory.messages.join("<br/>");
|
||||||
{
|
|
||||||
liberator.commandline.echo(messageHistory.messages[0], liberator.commandline.HL_NORMAL);
|
|
||||||
}
|
|
||||||
else if (messageHistory.length > 1)
|
|
||||||
{
|
|
||||||
let list = "";
|
|
||||||
|
|
||||||
for (let [,message] in Iterator(messageHistory.messages))
|
// TODO: are messages all single line?
|
||||||
list += message + "<br/>";
|
liberator.commandline.echo(list);
|
||||||
|
|
||||||
liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);
|
|
||||||
}
|
|
||||||
}, { argCount: "0" });
|
}, { argCount: "0" });
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
|
|||||||
Reference in New Issue
Block a user