X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;ds=sidebyside;f=rogue_chat_curses.py;h=acd6fa1719fb05a6329aeda2b81924419f65beb4;hb=0dfec5ae86777e8ac5ab35eb6e1f0b6846a4859e;hp=defc2724840ae41127b20748669288e8c5bbf73c;hpb=0a25fa6dadb1560ed64c22fe12a6c3d8de567b84;p=plomrogue2 diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index defc272..acd6fa1 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -627,7 +627,9 @@ class TUI: self.input_ = "" self.switch_mode('play') elif self.mode == self.mode_chat and key == '\n': - if self.input_[0] == '/': + 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') elif self.input_ in {'/' + self.keys['switch_to_study'], '/study'}: