From 4e31e852bd02aa77ce44f0ff8193ee6ca0552f58 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 16 Nov 2020 01:16:35 +0100
Subject: [PATCH] In web client, enforce terminal size restrictions harder.

---
 rogue_chat_nocanvas_monochrome.html | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html
index 0299d6c..d6e8a6e 100644
--- a/rogue_chat_nocanvas_monochrome.html
+++ b/rogue_chat_nocanvas_monochrome.html
@@ -968,7 +968,7 @@ tui.inputEl.addEventListener('keydown', (event) => {
 }, false);
 
 rows_selector.addEventListener('input', function() {
-    if (rows_selector.value % 4 != 0) {
+    if (rows_selector.value % 4 != 0 || rows_selector.value < 24) {
         return;
     }
     window.localStorage.setItem(rows_selector.id, rows_selector.value);
@@ -976,7 +976,7 @@ rows_selector.addEventListener('input', function() {
     tui.full_refresh();
 }, false);
 cols_selector.addEventListener('input', function() {
-    if (cols_selector.value % 4 != 0) {
+    if (cols_selector.value % 4 != 0 || cols_selector.value < 80) {
         return;
     }
     window.localStorage.setItem(cols_selector.id, cols_selector.value);
-- 
2.30.2