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

add QnD :message highlighting

This commit is contained in:
Doug Kearns
2008-10-05 16:32:38 +00:00
parent 9e13dee7dd
commit c985af4f20

View File

@@ -500,12 +500,14 @@ liberator.CommandLine = function () //{{{
"Display previously given messages",
function ()
{
// TODO: color messages
// : are all messages single line? Some display an aggregation
// TODO: are all messages single line? Some display an aggregation
// of single line messages at least. E.g. :source
let list = messageHistory.messages.join("\n");
let list = <></>;
liberator.commandline.echo(list);
for (let [,message] in Iterator(messageHistory.messages))
list += <div class={message.highlight}>{message.msg}</div>;
liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE);
},
{ argCount: "0" });
@@ -604,7 +606,7 @@ liberator.CommandLine = function () //{{{
highlightGroup = highlightGroup || this.HL_NORMAL;
if (flags & this.APPEND_TO_MESSAGES)
messageHistory.add(str);
messageHistory.add({ msg: str, highlight: highlightGroup });
var where = setLine;
if (flags & this.FORCE_MULTILINE)