I don't know if it solved flicker, but rev a8c9ffc2 
<https://github.com/leo-editor/leo-editor/commit/a8c9ffc2700dfa591460e076b6d783be4dc9382f>
 contains 
some code aimed to skip unnecessary redraws. If you look at onSelect 
handler in line_numbering plugin it merely calls request_update:
 

def request_update(c):

    h = c.hash()

    if REQUESTS.get(h):return

    REQUESTS[h] = True

    QtCore.QTimer.singleShot(200, lambda:renumber(c))


Which as you can see will set timer to call renumber after 200ms. You can 
experiment with this delay or even call renumber directly without delay.

Additionally, we may pre-calculate and cache largest line numbers (~ or 
gutter with) in whole outline and keep them cached for every external file 
and every line-numbering-root node. I think that change in with of gutter 
is main cause of unpleasant flicker.

Or we can make gutter to have fixed with (for example: three digits in 
normal font), and when we need more digits to paint them with smaller font 
or x-scaled to fit within fixed gutter width.

Vitalije

-- 
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