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

Show the default styles in :highlight, etc.

This commit is contained in:
Kris Maglione
2008-10-31 22:46:34 +00:00
parent d7c5e79cd7
commit f0d258c8fc
7 changed files with 522 additions and 405 deletions

View File

@@ -214,8 +214,10 @@ function CommandLine() //{{{
.selection.getRangeAt(0)
.startContainer.parentNode
.scrollWidth > commandWidget.inputField.scrollWidth)
// Yeah, the min-width is stupid. Somehow, it doesn't work otherwise.
setMultiline(<p style={"white-space: normal; min-width: " + commandWidget.inputField.scrollWidth + "px; width: 100%"}>{str}</p>, highlightGroup);
{
setCommand("");
setMultiline(<span class="hl-Message">{str}</span>, highlightGroup);
}
}
// TODO: extract CSS
@@ -233,7 +235,7 @@ function CommandLine() //{{{
* after interpolated data.
*/
XML.ignoreWhitespace = typeof str == "xml";
var output = <div class={"ex-command-output " + highlightGroup}>{template.maybeXML(str)}</div>;
var output = <div class={"ex-command-output " + highlightGroup} style={"min-width: " + commandlineWidget.scrollWidth + "px"}>{template.maybeXML(str)}</div>;
XML.ignoreWhiteSpace = true;
lastMowOutput = output;
@@ -267,7 +269,7 @@ function CommandLine() //{{{
if (win.scrollY >= win.scrollMaxY)
setLine("Press ENTER or type command to continue", commandline.HL_QUESTION, true);
else
setLine("-- More --", commandline.HL_QUESTION, true);
setLine("-- More --", commandline.HL_MOREMSG, true);
}
else
{
@@ -278,7 +280,7 @@ function CommandLine() //{{{
win.focus();
startHints = false;
modes.push(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE);
modes.set(modes.COMMAND_LINE, modes.OUTPUT_MULTILINE);
}
function autosizeMultilineInputWidget()
@@ -532,7 +534,7 @@ function CommandLine() //{{{
let list = <></>;
for (let [,message] in Iterator(messageHistory.messages))
list += <div class={message.highlight}>{message.str}</div>;
list += <div class={message.highlight + " hl-Message"}>{message.str}</div>;
liberator.echo(list, commandline.FORCE_MULTILINE);
}
@@ -591,7 +593,7 @@ function CommandLine() //{{{
historyIndex = UNINITIALIZED;
completionIndex = UNINITIALIZED;
modes.push(modes.COMMAND_LINE, currentExtendedMode);
modes.set(modes.COMMAND_LINE, currentExtendedMode);
setHighlightGroup(this.HL_NORMAL);
setPrompt(currentPrompt);
setCommand(currentCommand);