#2062: Screen.add_line.get_line_chunks() discards everything before first colour
string.
---------------------+------------------------------------------------------
Reporter: eirikba | Owner:
Type: patch | Status: new
Priority: minor | Milestone: Future
Component: other | Version: git 1.3-stable
Keywords: |
---------------------+------------------------------------------------------
Comment(by eirikba):
No, it doesn't need such drastic change. It would be enough to handle the
beginning of the line before the loop. However, your change wouldn't
work. If the input doesn't contain any occurrences of '{!', then the loop
won't be entered at all!
The reason for the complete rewrite was that I didn't particularly like
the old code :)
Unfortunately, my version ended up less elegant than I had hoped for, too.
Still, I think my version is simpler, less magic and thus "more obviously
correct" than the old one. But maybe I should have gone for a simpler
"split off the beginning per iteration" loop instead. I'll write that up
and see what it looks like.
I don't think it is particularly useful for this code to raise an
exception. The result of chunking will be passed on to the real parser
afterwards. It is probably better to leave any error detection to that
one. (And that is exactly the point where I don't know how '{!}' will be
interpreted.)
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2062#comment:2>
Deluge <http://deluge-torrent.org/>
Deluge project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/deluge-dev?hl=en.