fix a crash on completion, fixed #1722

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2010-08-14 09:01:22 +00:00
parent 20b1f68764
commit f179cbdd2e

View file

@ -584,7 +584,7 @@ class Input(Win):
(y, x) = self.win.getyx()
if not self.last_completion:
# begin is the begining of the nick we want to complete
if self.text != '':
if self.text.strip() != '':
begin = self.text.split()[-1].encode('utf-8').lower()
else:
begin = ''