Bug fix: On split messages, end all c tags and restart them on next message

This commit is contained in:
Kiooeht 2011-06-09 16:46:36 -07:00
parent 70329a998b
commit 5ece68c829
3 changed files with 23 additions and 0 deletions

View file

@ -54,6 +54,7 @@ CHANGELOG
* Don't split messages in bad places - Kiooeht [evacipatedBox] * Don't split messages in bad places - Kiooeht [evacipatedBox]
* Chumhandles must match EXACTLY to register mood changes - Kiooeht [evacipatedBox] * Chumhandles must match EXACTLY to register mood changes - Kiooeht [evacipatedBox]
* Menu bar text colour correct when default system colour isn't black - Kiooeht [evacipatedBox] * Menu bar text colour correct when default system colour isn't black - Kiooeht [evacipatedBox]
* End all colour tags and restart them on split messages - Kiooeht [evacipatedBox]
### 3.14.1 ### 3.14.1
* Pesterchum 3.14 - illuminatedwax [ghostDunk] * Pesterchum 3.14 - illuminatedwax [ghostDunk]

View file

@ -21,6 +21,7 @@ Bugs
* When left for a really long time, animations slow down pesterchum * When left for a really long time, animations slow down pesterchum
* Openning userlist resets appearance of OP/voice for anyone that become OP/voice after you joined a memo * Openning userlist resets appearance of OP/voice for anyone that become OP/voice after you joined a memo
* Windows: Dragging a chum on top of another chum and releasing makes one disappear * Windows: Dragging a chum on top of another chum and releasing makes one disappear
* If pesterchum is open but offline due to a network failure and you open the memos screen, it connects you but doesn't fetch the memo list when it finishes connecting
Mac Bugs Mac Bugs
-------- --------

21
irc.py
View file

@ -110,6 +110,27 @@ class PesterIRC(QtCore.QThread):
space = space+4 space = space+4
a = l[0][0:space+1] a = l[0][0:space+1]
b = l[0][space+1:] b = l[0][space+1:]
if a.count("<c") > a.count("</c>"):
# oh god ctags will break!! D=
hanging = []
usedends = []
c = a.rfind("<c")
while c != -1:
d = a.find("</c>", c)
while d in usedends:
d = a.find("</c>", d+1)
if d != -1: usedends.append(d)
else:
f = a.find(">", c)+1
hanging.append(a[c:f])
c = a.rfind("<c",0,c)
# end all ctags in first part
for i in range(a.count("<c")-a.count("</c>")):
a = a + "</c>"
#start them up again in the second part
for c in hanging:
b = c + b
if len(b) > 0: if len(b) > 0:
return [a] + splittext([b]) return [a] + splittext([b])
else: else: