The new code is experimental, but it appears to be fast enough.  Indeed, it 
might even be faster because several redundant redraws have been removed.

The new code is really just the beginning of experimentation.

If you have any problems, you can disable the new code as described in the 
following checkin log:

QQQ
Debugged and enabled the python-only replacement for QSyntaxHighlighter.

Changes to qtGui.py:

- Added NEW_COLORER = True in leo/plugins/qtGui.py.
  To disable the new code, just set this switch to False.
  All unit tests regardless of this switch.

- The setHighlighter method no longer does an immediate recolor.
  It appears that this recolor is *never* needed.

- Added class LeoSyntaxHighlighter, the python-only replacement for 
leoQtSyntaxHighlighter.
  This class is a complete new copy, which seems simpler than yet another 
hard-to-understand subclass.

Changes to leo/core/qtsyntaxhighlighter.py:

- setDocument does not fire the single-shot, eliminating yet another 
redundant recolor.
  This is not needed because selecting a new node *always* recolors it.
  
- Fixed some crasher by adding guards in the getter/setter methods.

- Fixed the one and only real bug in the transliteration:
  The r object must be re-allocated each time through the loop in 
_applyFormatChanges.
  Failure to do this caused most formats to be black.
QQQ

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.


Reply via email to