From a1372680754a527409c039152d2e65399b601e35 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 12 Nov 2020 20:12:23 +0100 Subject: [PATCH] Fix empty input bug in curses client. --- rogue_chat_curses.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index e037e7d..acd6fa1 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -627,6 +627,8 @@ class TUI: self.input_ = "" self.switch_mode('play') elif self.mode == self.mode_chat and key == '\n': + if self.input_ == '': + continue if self.input_[0] == '/': # FIXME fails on empty input if self.input_ in {'/' + self.keys['switch_to_play'], '/play'}: self.switch_mode('play') -- 2.30.2