Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When a file is opened and the folding collapses the comment at the top of the file, then the position of the editor changes. It correctly renders the updated text, but not the line numbers. The line numbers only update when the editor is redrawn for some other reason.
It's caused by: ebab6a1f199c1b293a2eab94a60e469c2ae98f45
That's the downside of having that on a thread, an update could collapse a part of code. This is not a behaviour we should do anyways. Fixing the line numbers don't fix the problem.
Let's have the discussion in #2846 about the whole thing.
Er, no. It's a separate bug EXPOSED by that change.
The problem is that when text editor moves and re-renders, the line numbers do not re-render.
Why does it work now ?
It hasn't to do with text editor movement etc - otherwise you would see that now or when you scroll.
It's simply that if you fill the text editor structure with a folding tree that contains collapsed segments you should do a re-rendering of the text editor.
Doing re-renderings after each fold tree update is just a waste of cpu power - it tries to "detect" the need of that. However for the first fold update this is not done - the first update is implemented to run on the gui thread before the rendering - the next updates do this update & are started as background worker.
Therefore the change does more than exposing it - it's using the fold segment update in a way it wasn't built for.
I've implemented a fast parser for the collapsed sections to generate a fold tree, that should fix that - but I added a update when it runs on the main thread as well, then that works anyways.