The new code has never crashed for me when using Python 2 or 3. There are
no guarantees, however. Please report any problems immediately. Only time
will tell how reliable the code is.
Before I get into the details of the changes, it's clear that dealing with
Python code instead of C++ code is a major advantage. It's now trivial to
add traces, which seems the only way to understand what is happening.
Furthermore, being able to add hacks to the code (in Python) is big plus.
Tracing lead directly to a fix for a major performance bug in the new code.
Previously, the python-only colorizer colored each body text twice, which
for long text meant that there were two sets of queued recoloring code
operating in parallel! It's not clear to me whether this bug affects the
C++ version of QSyntaxHighlighter. It might.
The fix was to test self.c.frame.body.colorizer.changingText in
_q_reformatBlocks, something that might not be possible when using the C++
code. It certainly would not be easy to do. The new code puts much less
stress on Qt. Weird race conditions no longer seem possible.
I also changed an piece of init code. I'm *guessing* how to transliterate
the original call to QVector.fill. The present code in _reformatBlock is::
self.formatChanges = [QtGui.QTextFormat()] * (block.length())
which seems more reasonable than the old code::
self.formatChanges = [QtGui.QTextFormat()] * (block.length() - 1)
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.