summaryrefslogtreecommitdiff
path: root/common/content/commandline.js
diff options
context:
space:
mode:
Diffstat (limited to 'common/content/commandline.js')
-rw-r--r--common/content/commandline.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/content/commandline.js b/common/content/commandline.js
index 3498ca1b..eb79c3ef 100644
--- a/common/content/commandline.js
+++ b/common/content/commandline.js
@@ -255,6 +255,8 @@ const CommandWidgets = Class("CommandWidgets", {
let elem = this.multilineOutput;
elem.contentWindow.addEventListener("unload", function (event) { event.preventDefault(); }, true);
elem.contentDocument.body.id = "dactyl-multiline-output-content";
+ elem.__defineGetter__("atEnd", function ()
+ !Buffer.isScrollable(elem.contentDocument.documentElement, 1));
["copy", "copylink", "selectall"].forEach(function (tail) {
// some host apps use "hostPrefixContext-copy" ids
@@ -617,6 +619,8 @@ const CommandLine = Module("commandline", {
this.widgets.message = null;
if (modes.main != modes.COMMAND_LINE)
this.widgets.command = null;
+ if ((modes.extended & modes.OUTPUT_MULTILINE) && this.widgets.multilineOutput.atEnd)
+ modes.pop();
if (modes.extended != modes.OUTPUT_MULTILINE)
this.multilineOutputVisible = false;
},