home · contact · privacy
Minor fix.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 25 Oct 2020 18:50:28 +0000 (19:50 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 25 Oct 2020 18:50:28 +0000 (19:50 +0100)
new2/rogue_chat.html

index f584ddd3108ccecbbb035047a5d9245a3984456f..37eb27a426c53bdc893d118dff6432aaa3c6a56f 100644 (file)
@@ -147,8 +147,7 @@ let tui = {
       chunk += msg[i];
     }
     chat.history.unshift(' '.repeat(indent) + chunk);
       chunk += msg[i];
     }
     chat.history.unshift(' '.repeat(indent) + chunk);
-    if (chat.history.length > terminal.rows - 2) {
-
+    while (chat.history.length > terminal.rows - 2) {
       chat.history.pop();
     };
     this.draw_history();
       chat.history.pop();
     };
     this.draw_history();