The fast-colorizing git branch is a revolution in syntax coloring, while 
using the bulk of Leo's existing coloring code. The new code supports all 
of the languages in leo/modes.

Please test this branch for at least a day or so before being merged into 
the main line. Please report any problems immediately.

This branch is revolutionary in several senses:

1. It fixes, at long last #273 
<https://github.com/leo-editor/leo-editor/issues/273>: Qt Bug involving 
large text nodes.

2. It completes #365 <https://github.com/leo-editor/leo-editor/issues/365>: 
Use pyzo syntax coloring.

3. From an engineering standpoint, it revolutionizes Leo's approach to Qt's 
QSyntaxHighlighter class.  In essence, *everything happens automatically*. 
When changing nodes, Leo need only re-init the underlying jEdit colorizing 
code so that the proper language is colorized.  

This is a stupendous advance. No need for any of the interface in the 
ColorizerMixin class.  No need to "lock out" coloring: it happens 
automatically whenever Leo's body pane changes! Heh.  As I write this I see 
that colorizer.colorize is no longer ever called!

I don't think I have ever misunderstood a class as badly as I have 
misunderstood QSyntaxHighlighter class.  Set up and used properly, it is an 
amazing helper. To be fair, Leo uses this class in a very unusual manner. 
The mistake I made was subtle, and the Qt documents don't warn against it.

The performance bug created by calling QSyntaxHighlighter *explicitly* 
caused a "series of unfortunate events" ;-) Seeing the speed pyzo's pure 
python syntax colorer was the key breakthrough.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to