summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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)