summaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea89/website/KConsole.kt
diff options
context:
space:
mode:
authornea <romangraef@loves.dicksinhisan.us>2021-12-09 03:09:45 +0100
committernea <romangraef@loves.dicksinhisan.us>2021-12-09 03:09:45 +0100
commit3efd5ae38bf5467c3d61c9b3478ca96950104510 (patch)
tree2d777afecfc0433ddbf05b8d7421fa5d35ad38fa /src/main/kotlin/moe/nea89/website/KConsole.kt
parentf8c6246a262b1d15e42ce812363f7d4e4eb16b8a (diff)
downloadneamoe-3efd5ae38bf5467c3d61c9b3478ca96950104510.tar.gz
neamoe-3efd5ae38bf5467c3d61c9b3478ca96950104510.tar.bz2
neamoe-3efd5ae38bf5467c3d61c9b3478ca96950104510.zip
delay
Diffstat (limited to 'src/main/kotlin/moe/nea89/website/KConsole.kt')
-rw-r--r--src/main/kotlin/moe/nea89/website/KConsole.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/moe/nea89/website/KConsole.kt b/src/main/kotlin/moe/nea89/website/KConsole.kt
index 29e2264..6c4f707 100644
--- a/src/main/kotlin/moe/nea89/website/KConsole.kt
+++ b/src/main/kotlin/moe/nea89/website/KConsole.kt
@@ -52,7 +52,6 @@ class KConsole(
fun addLine(line: String) {
lines.add(line)
- scrollDown()
}
fun scrollDown() {
@@ -61,8 +60,9 @@ class KConsole(
fun rerender() {
var view = lines.joinToString(separator = "\n")
- if (state == ConsoleState.SHELLPROMPT)
+ if (state == ConsoleState.SHELLPROMPT) {
view += "\n${'$'} $input"
+ }
text.innerText = view
}