summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-09-03 12:07:41 +0200
committerTimotej Lazar <timotej.lazar@araneo.org>2015-09-03 12:16:09 +0200
commit48c5373668c8659f05daad1f96287684f0bb574a (patch)
treead1200e9fad63c8c565c7a04bb7d6a434c03d0b6
parenteec09515c27bb71c10255f35c4b7c1c65148216c (diff)
Fix scrolling and line-breaking in CodeQ console
-rw-r--r--css/codeq.css5
-rw-r--r--css/codeq/console.css2
-rw-r--r--js/codeq/console.js11
3 files changed, 12 insertions, 6 deletions
diff --git a/css/codeq.css b/css/codeq.css
index 1207143..7172ef8 100644
--- a/css/codeq.css
+++ b/css/codeq.css
@@ -95,9 +95,10 @@ body {
/* console */
#console {
- min-height: 100%;
- height: 100%;
+ background: black;
font-size: 14px;
+ height: 100%;
+ overflow-y: auto;
padding: 0;
}
diff --git a/css/codeq/console.css b/css/codeq/console.css
index 3e00913..4290eea 100644
--- a/css/codeq/console.css
+++ b/css/codeq/console.css
@@ -1,8 +1,8 @@
.cq-con {
- background: black;
color: greenyellow;
font-family: "Courier Menlo", Monaco, Consolas, "Courier New", monospace;
font-size: medium;
+ word-break: break-all;
}
.cq-con-text {
diff --git a/js/codeq/console.js b/js/codeq/console.js
index 023fcc1..ddf4ce6 100644
--- a/js/codeq/console.js
+++ b/js/codeq/console.js
@@ -550,7 +550,7 @@
handleInput = function (chars) {
var cookedChars = chars, // default
startingRow = currentRow,
- endingRow, i;
+ dh, i;
if (inputDisabled) {
// flatly ignore
@@ -580,7 +580,7 @@
if (lineBuffered) {
if (currentRow !== startingRow) {
// in line-buffered mode emit each line separately, except for the last (current) line
- for (i = startingRow; i < endingRow; i++) {
+ for (i = startingRow; i < lines.length; i++) {
try {
handler.onInput(lines[i].content);
}
@@ -601,6 +601,11 @@
}
clipboardPasteInProgress = false;
+
+ // scroll to bottom on input
+ dh = jqContent.height() - jqElt.height();
+ if (dh > 0)
+ jqElt.scrollTop(dh);
},
clipboardPasteInProgress = false, // whether the previous keydown was a CTRL+V or shift+insert
@@ -713,4 +718,4 @@
return handler;
};
-})(); \ No newline at end of file
+})();