diff --git a/common/content/events.js b/common/content/events.js
index 730ec02f..2134b214 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -298,8 +298,6 @@ function Events() //{{{
{
// TODO: is all of that necessary?
modes.reset();
- commandline.clear();
- modes.show();
statusline.updateTabCount();
tabs.updateSelectionHistory();
@@ -1179,7 +1177,6 @@ function Events() //{{{
selection.collapseToStart();
}
catch (e) {}
- commandline.clear();
modes.reset();
liberator.focusContent(true);
diff --git a/common/content/liberator.js b/common/content/liberator.js
index af1aa88b..70d4bbfd 100644
--- a/common/content/liberator.js
+++ b/common/content/liberator.js
@@ -1215,6 +1215,8 @@ const liberator = (function () //{{{
config.dialogs = config.dialogs || [];
config.helpFiles = config.helpFiles || [];
+ liberator.triggerObserver("load");
+
// commands must always be the first module to be initialized
loadModule("commands", Commands);
loadModule("options", Options);
diff --git a/common/content/liberator.xul b/common/content/liberator.xul
index fe7c63a7..3be74c0b 100644
--- a/common/content/liberator.xul
+++ b/common/content/liberator.xul
@@ -79,13 +79,16 @@ the terms of any one of the MPL, the GPL or the LGPL.
onclick="liberator.modules.commandline.onMultilineOutputEvent(event)"/>
-
-
-
-
+
+
+
+
+
+
+
commandWidget.inputField.scrollWidth)
- {
- setCommand("");
+ messageBox.value = str;
+
+ if (!commandShown())
+ commandline.hide();
+
+ let field = messageBox.inputField;
+ if (!forceSingle && field.editor.rootElement.scrollWidth > field.scrollWidth)
setMultiline({str}, highlightGroup);
- }
+ else
+ messageBox.collapsed = false;
}
// TODO: extract CSS
@@ -847,9 +856,10 @@ function CommandLine() //{{{
historyIndex = UNINITIALIZED;
modes.set(modes.COMMAND_LINE, currentExtendedMode);
- setHighlightGroup(this.HL_NORMAL);
+
setPrompt(currentPrompt);
setCommand(currentCommand);
+ commandlineWidget.collapsed = false;
commandWidget.focus();
@@ -873,19 +883,19 @@ function CommandLine() //{{{
statusline.updateProgress(""); // we may have a "match x of y" visible
liberator.focusContent(false);
- this.clear();
- keepCommand = false;
- },
-
- clear: function clear()
- {
multilineInputWidget.collapsed = true;
outputContainer.collapsed = true;
completionList.hide();
this.resetCompletions();
+ this.hide();
+ keepCommand = false;
+ },
+
+ hide: function hide()
+ {
if (!keepCommand || this.silent)
- setLine("", this.HL_NORMAL);
+ commandlineWidget.collapsed = true;
},
// liberator.echo uses different order of flags as it omits the hightlight group, change v.commandline.echo argument order? --mst
@@ -975,13 +985,8 @@ function CommandLine() //{{{
{
// prevent losing focus, there should be a better way, but it just didn't work otherwise
setTimeout(function () {
- if (liberator.mode == modes.COMMAND_LINE &&
- !(modes.extended & modes.INPUT_MULTILINE) &&
- !(modes.extended & modes.OUTPUT_MULTILINE) &&
- event.originalTarget == commandWidget.inputField)
- {
+ if (commandShown() && event.originalTarget == commandWidget.inputField)
commandWidget.inputField.focus();
- }
}, 0);
}
else if (event.type == "focus")
@@ -1339,9 +1344,7 @@ function CommandLine() //{{{
if (passEvent || closeWindow)
{
- // FIXME: use mode stack
modes.pop();
- this.clear();
if (passEvent)
events.onKeyPress(event);
@@ -1354,10 +1357,6 @@ function CommandLine() //{{{
updateMorePrompt: function updateMorePrompt(force, showHelp)
{
- // prevent MOW events (still useful) from wiping out the command-line when in EX extended mode
- if (modes.extended != modes.OUTPUT_MULTILINE)
- return;
-
let win = multilineOutputWidget.contentWindow;
function isScrollable() !win.scrollMaxY == 0;
function atEnd() win.scrollY / win.scrollMaxY >= 1;
diff --git a/common/skin/liberator.css b/common/skin/liberator.css
index c892b45e..8274778e 100644
--- a/common/skin/liberator.css
+++ b/common/skin/liberator.css
@@ -96,8 +96,8 @@ the terms of any one of the MPL, the GPL or the LGPL.
@-moz-document
url-prefix(chrome://) {
-#liberator-container {
- font-family: monospace;
+.liberator-container > * {
+ font-family: inherit;
}
#liberator-completions {
@@ -108,13 +108,15 @@ the terms of any one of the MPL, the GPL or the LGPL.
}
/* fixes the min-height: 22px from firefox */
-#status-bar, statusbarpanel {
+#status-bar,
+statusbarpanel {
-moz-appearance: none !important;
min-height: 18px !important;
border: none !important;
font-weight: bold;
font-family: monospace;
}
+
#liberator-statusline {
font-family: monospace;
margin: 0px;
@@ -138,14 +140,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
display: none;
}
-#liberator-commandline {
- padding: 1px;
- font-family: monospace;
- /*
- background-color: white;
- color: black;
- */
-}
#liberator-commandline-prompt {
margin: 0px;
padding: 0px;
@@ -156,11 +150,6 @@ the terms of any one of the MPL, the GPL or the LGPL.
color: inherit;
}
-#liberator-visualbell {
- border: none;
- background-color: black;
-}
-
#sidebar {
max-width: 90% !important;
min-width: 10% !important;
@@ -168,29 +157,37 @@ the terms of any one of the MPL, the GPL or the LGPL.
/* MOW */
-#liberator-completions, #liberator-multiline-output, #liberator-multiline-input {
+#liberator-completions,
+#liberator-multiline-output,
+#liberator-multiline-input {
overflow: hidden;
background-color: white;
color: black;
}
-#liberator-completions-content, #liberator-multiline-output-content, #liberator-multiline-input {
+#liberator-completions-content,
+#liberator-multiline-output-content,
+#liberator-multiline-input {
white-space: pre;
font-family: -moz-fixed;
margin: 0px;
}
-#liberator-completions-content *, #liberator-multiline-output-content * {
+#liberator-completions-content *,
+#liberator-multiline-output-content * {
font: inherit;
}
-#liberator-completions-content table, #liberator-multiline-output-content table {
+#liberator-completions-content table,
+#liberator-multiline-output-content table {
white-space: inherit;
border-spacing: 0px;
}
-#liberator-completions-content td, #liberator-multiline-output-content td,
-#liberator-completions-content th, #liberator-multiline-output-content th {
+#liberator-completions-content td,
+#liberator-multiline-output-content td,
+#liberator-completions-content th,
+#liberator-multiline-output-content th {
padding: 0px 2px;
}