From: Christian Heller Date: Thu, 12 Nov 2020 19:12:23 +0000 (+0100) Subject: Fix empty input bug in curses client. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bdb.prefix%7D%7D/%7B%7Bprefix%7D%7D/condition?a=commitdiff_plain;h=a1372680754a527409c039152d2e65399b601e35;p=plomrogue2 Fix empty input bug in curses client. --- 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')