summaryrefslogtreecommitdiff
path: root/src/gui.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-14 08:58:31 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-14 08:58:31 +0000
commit20b1f687642ee91a423204ee13e14161df3946dd (patch)
tree02e2deb8d39c7202e8e01d8ac17f20c49d33bbb4 /src/gui.py
parent79ce5c23324880b7cc7df3dea73dffee45131566 (diff)
downloadpoezio-20b1f687642ee91a423204ee13e14161df3946dd.tar.gz
poezio-20b1f687642ee91a423204ee13e14161df3946dd.tar.bz2
poezio-20b1f687642ee91a423204ee13e14161df3946dd.tar.xz
poezio-20b1f687642ee91a423204ee13e14161df3946dd.zip
Fix a little bug on completion due to the separating line
Diffstat (limited to 'src/gui.py')
-rw-r--r--src/gui.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui.py b/src/gui.py
index 6b9180ad..8038243f 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -288,6 +288,8 @@ class Gui(object):
char_we_dont_want = [',', '(', ')', '.']
words = list()
for msg in self.current_room().messages[:-9:-1]:
+ if not msg:
+ continue
for word in msg.txt.split():
for char in char_we_dont_want: # remove the chars we don't want
word = word.replace(char, '')
@@ -1018,6 +1020,8 @@ class Gui(object):
i = 0
link = None
for msg in self.current_room().messages[:-200:-1]:
+ if not msg:
+ continue
matches = re.findall('"((ftp|http|https|gopher|mailto|news|nntp|telnet|wais|file|prospero|aim|webcal):(([A-Za-z0-9$_.+!*(),;/?:@&~=-])|%[A-Fa-f0-9]{2}){2,}(#([a-zA-Z0-9][a-zA-Z0-9$_.+!*(),;/?:@&~=%-]*))?([A-Za-z0-9$_+!*();/?:~-]))"', msg.txt)
for m in matches:
if i == nb:
@@ -1065,4 +1069,3 @@ class Gui(object):
sleep(0.2) # :(
self.reset_curses()
sys.exit()
-