summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-07-01 23:08:49 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-07-01 23:08:49 +0000
commitbbd32649e2c45afc8ecf94a130dad627308775fe (patch)
tree30fad4f12a2c2853febeaa19e8ff6f326bab18c8 /src
parente8b60effc5cc6262fad9fe816028acf954632a37 (diff)
downloadpoezio-bbd32649e2c45afc8ecf94a130dad627308775fe.tar.gz
poezio-bbd32649e2c45afc8ecf94a130dad627308775fe.tar.bz2
poezio-bbd32649e2c45afc8ecf94a130dad627308775fe.tar.xz
poezio-bbd32649e2c45afc8ecf94a130dad627308775fe.zip
fixed #1555
Diffstat (limited to 'src')
-rw-r--r--src/window.py8
1 files 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)