From c985af4f20c534328a5198cc46cb7a7379fabe6b Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sun, 5 Oct 2008 16:32:38 +0000 Subject: [PATCH] add QnD :message highlighting --- content/ui.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/content/ui.js b/content/ui.js index e7292667..73f98267 100644 --- a/content/ui.js +++ b/content/ui.js @@ -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 +=
{message.msg}
; + + 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) @@ -1321,7 +1323,7 @@ liberator.ItemList = function (id) //{{{ if (container.collapsed) { minHeight = 0; - autoSize(); + autoSize(); } container.collapsed = false; },