On Sat, Aug 12, 2017 at 5:01 AM, vitalije <[email protected]> wrote:
> 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. > This is much better. > 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 > [width] of gutter is main cause of unpleasant flicker. > I agree. A few days ago I changed the NumberBar class so it always provided width for at least 4 digits, which mostly avoids this kind of flicker without making the gutter too wide. 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. > There is a font-dependent setting for adjusting the width of the gutter. [And now you have found it too: @int gutter-w-adjust] Oops! I wanted to look it up in myLeoSettings.leo, but executing the my-leo-settings-leo command caused Leo to exit with this uncaught exception: Traceback (most recent call last): File "c:\leo.repo\leo-editor\leo\core\leoPlugins.py", line 341, in callTagHandler result = handler(tag, keywords) File "c:\leo.repo\leo-editor\leo\plugins\line_numbering.py", line 64, in onSelect with number_bar_widget(c) as w: File "c:\Anaconda3\lib\contextlib.py", line 61, in __enter__ raise RuntimeError("generator didn't yield") from None RuntimeError: generator didn't yield Traceback (most recent call last): File "c:\leo.repo\leo-editor\leo\core\leoPlugins.py", line 341, in callTagHandler result = handler(tag, keywords) File "c:\leo.repo\leo-editor\leo\plugins\line_numbering.py", line 64, in onSelect with number_bar_widget(c) as w: File "c:\Anaconda3\lib\contextlib.py", line 61, in __enter__ raise RuntimeError("generator didn't yield") from None RuntimeError: generator didn't yield Traceback (most recent call last): File "c:\leo.repo\leo-editor\leo\plugins\line_numbering.py", line 107, in <lambda> QtCore.QTimer.singleShot(200, lambda:renumber(c)) File "c:\leo.repo\leo-editor\leo\plugins\line_numbering.py", line 97, in renumber with number_bar_widget(c) as w: File "c:\Anaconda3\lib\contextlib.py", line 61, in __enter__ raise RuntimeError("generator didn't yield") from None RuntimeError: generator didn't yield Please fix this :-) I don't think Leo's plugin handlers have a chance of catching exceptions in callbacks... 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 https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
