From c2732dbd6d4a149388c2deec9b9d2dc6b9c81d69 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Thu, 29 Oct 2020 17:18:31 +0100
Subject: [PATCH] Fix single char chat messages.

---
 new2/plomrogue/io.py                     | 1 +
 new2/rogue_chat_nocanvas_monochrome.html | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/new2/plomrogue/io.py b/new2/plomrogue/io.py
index 908d7bf..2c048f0 100644
--- a/new2/plomrogue/io.py
+++ b/new2/plomrogue/io.py
@@ -56,6 +56,7 @@ class GameIO():
         from plomrogue.errors import GameError, ArgError, PlayError
         from plomrogue.misc import quote
 
+        print('DEBUG', input_);
         def answer(connection_id, msg):
             if connection_id:
                 self.send(msg, connection_id)
diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html
index 7f1820f..0ec2394 100644
--- a/new2/rogue_chat_nocanvas_monochrome.html
+++ b/new2/rogue_chat_nocanvas_monochrome.html
@@ -527,9 +527,11 @@ document.addEventListener('keydown', (event) => {
                 } else {
                     tui.log_msg('? unknown command');
                 }
-            } else {
-                server.send(['ALL', tui.input]);
+	    } else {
+	        server.send(['ALL', tui.input]);
             }
+	} else if (tui.input.length > 0) {
+	    server.send(['ALL', tui.input]);
         }
         tui.empty_input();
         tui.full_refresh();
-- 
2.30.2