On Tue, May 29, 2012 at 10:32 PM, Terry Brown <[email protected]> wrote:
> I wanted to check it existed before my changes to nested_splitter, and > it did, running Leo from 5367 and then reverting the code and opening > the new code in the old Leo shows the problem. Thanks for doing this. However, it's hard to believe that anything except the Qt drawing code, including the colorizer, is involved. > But it raises the question what's so special about the node that's > exhibiting the problem? A very good question. There, without question, nothing special about the node as far as Leo's colorer is concerned. Traces make that quite clear. > I don't think the node's at fault, but knowing > why ctrl-f to select something in that node shows the problem when > ctrl-f to select something in other nodes doesn't might throw some > light on the issue. Playing around quickly I couldn't get it to > manifest elsewhere. I'm sure nodes which fit entirely in one view > won't show it, but I tried longer ones as well. Indentation level? Indentation level has no effect on Leo's colorizer. In fact, Leo's colorizer consists of lots of independent parts. Tracing the setTag method will show the *only* true interaction between Leo and QSyntaxHighlighter. Notice that everything is correctly colored and rendered after resizing the pane. This indicates to me that somehow the QSyntaxHighlighter is getting confused about what the clipping region should be. My model for what is happening is that there is some kind of unwholesome interaction between QSyntaxHighlighter and the text cursor. That interaction would be deep in the bowels of Qt. A possible workaround would be to adjust the "offending" clipping region/rect after calling rehighlight. But calls to w.update or w.repaint just after calling QSyntaxHighlighter.rehighlight have no effect, presumably because the clipping region remains the same. Otoh, manually resizing the pane corrects the clipping region, and that suffices. Leo's coloring code is not called in that case, and neither presumably is QSyntaxHighlighter.rehighlight. So the question is, is there some way to correct the clipping region created by QSyntaxHighlighter.rehighlight? If so, then a call to w.update would presumably make everything right. Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" 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/leo-editor?hl=en.
