Bugzilla – Bug 682466
Rendering corruption and jumping in text editor
Last modified: 2011-04-13 08:20:05 UTC
When I type anything in a class body in the text editor, it immediately unfolds the header comment, and the editor "jumps", and the editor's rendering is majorly corrupted. http://screencast.com/t/K0K7S1SVYga
In addition, the document often overruns the last line number (and not selectable). Cutting a substantial part of the buffer causes MD to crash: ERROR [2011-03-24 17:36:57Z]: Unhandled Exception System.NullReferenceException: Object reference not set to an instance of an object at Mono.TextEditor.Document.LogicalToVisualLine (Int32 logicalLine) [0x0001f] in /Users/michael/Mono/md-clean/main/src/core/Mono.Texteditor/Mono.TextEditor/Document.cs:1263 at Mono.TextEditor.TextEditor.UpdateAdjustments () [0x00000] in /Users/michael/Mono/md-clean/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs:1461 at Mono.TextEditor.TextEditor.OnExposeEvent (Gdk.EventExpose e) [0x0000d] in /Users/michael/Mono/md-clean/main/src/core/Mono.Texteditor/Mono.TextEditor/TextEditor.cs:1475 at Gtk.Widget.exposeevent_cb (IntPtr widget, IntPtr evnt) [0x00000] in <filename unknown>:0
*** Bug 682867 has been marked as a duplicate of this bug. ***
I thought I did handle the folding correctly - but missed that update case. fixed & added to the unit tests.
I think this is still occurring in some cases. Rather than folding/unfolding code, try deleting a method including its folded doc comments and then undo it - the rendering breaks. Close the file, open it again, expand the doc, delete the method including the *expanded* doc and then undo it - all seems fine.
This is definitely still occurring for me in some situations. The basic situation is better, but there are still use cases where it happens. I'll try and track down a few more instructions on how to recreate above and beyond comment 4.
Formatting code seems to break it at the moment. Fold the comments, format the code and then see things shuffle around as they did before (even if no formatting needed changing)
fixed. It seems that I broke the folding - again -. I've extended the unit test suite quite a bit - I hope I got all cases this time.
*** Bug 687029 has been marked as a duplicate of this bug. ***