From: Christian Heller Date: Thu, 29 Oct 2020 16:18:31 +0000 (+0100) Subject: Fix single char chat messages. X-Git-Url: https://plomlompom.com/repos/task?a=commitdiff_plain;h=c2732dbd6d4a149388c2deec9b9d2dc6b9c81d69;p=plomrogue2-experiments Fix single char chat messages. --- 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();