From 77f28624afa28d4ab929b8865e1dfc2e441b7747 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 2 Nov 2020 14:44:50 +0100
Subject: [PATCH] Only count chat input as command if line starts with ":" (not
 " :").

---
 new2/rogue_chat_nocanvas_monochrome.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html
index 0708135..bb1ecda 100644
--- a/new2/rogue_chat_nocanvas_monochrome.html
+++ b/new2/rogue_chat_nocanvas_monochrome.html
@@ -605,7 +605,7 @@ tui.inputEl.addEventListener('keydown', (event) => {
     } else if (tui.mode == mode_chat && event.key == 'Enter') {
         let [tokens, token_starts] = parser.tokenize(tui.inputEl.value);
         if (tokens.length > 0 && tokens[0].length > 0) {
-            if (tokens[0][0] == command_char_selector.value) {
+            if (tui.inputEl.value[0][0] == command_char_selector.value) {
                 if (tokens[0].slice(1) == 'play' || tokens[0].slice(1) == 'p') {
                     tui.switch_mode(mode_play);
                 } else if (tokens[0].slice(1) == 'study' || tokens[0].slice(1) == '?') {
-- 
2.30.2