And fix the on_enter again (for commands)

This commit is contained in:
Florent Le Coz 2011-01-11 19:56:40 +01:00
parent a8630190fd
commit e016305c2b
2 changed files with 1 additions and 4 deletions

View file

@ -246,9 +246,7 @@ class ChatTab(Tab):
def on_enter(self):
txt = self.input.key_enter()
if not Tab.on_enter(self):
if txt.startswith('//'):
txt = txt[1:]
if not Tab.on_enter(self, txt):
self.command_say(txt)
def command_say(self, line):

View file

@ -704,7 +704,6 @@ class Input(Win):
return len(self.text) == 0
def resize(self, height, width, y, x, stdscr):
self._resize(height, width, y, x, stdscr)
self._win.erase()
self.addnstr(0, 0, self.text, self.width-1)