From bbd32649e2c45afc8ecf94a130dad627308775fe Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Thu, 1 Jul 2010 23:08:49 +0000 Subject: fixed #1555 --- src/window.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/window.py b/src/window.py index 9a7f811b..1a4d19f5 100644 --- a/src/window.py +++ b/src/window.py @@ -464,11 +464,11 @@ class Input(Win): return self.last_key_tab = True self.hit_list = hit_list - end = len(begin) + end = len(begin.decode('utf-8')) else: begin = self.text[:-len(after)].split()[-1].encode('utf-8').lower() self.hit_list.append(self.hit_list.pop(0)) # rotate list - end = len(begin) + len(after) + end = len(begin.decode('utf-8')) + len(after) x -= end try: self.win.move(y, x) @@ -517,11 +517,11 @@ class Input(Win): break if end: nick = nick[:-1] - x -= len(begin) + x -= len(begin.decode('utf-8')) self.win.move(y, x) # remove begin from the line self.win.clrtoeol() - self.text = self.text[:-len(begin)] + self.text = self.text[:-len(begin.decode('utf-8'))] self.text += nick.decode('utf-8') self.pos = len(self.text) self.win.addstr(nick) -- cgit v1.2.3