Can't override GtkTextView's insert_text vfunc
Submitted by Kai Willadsen
Created attachment 320520 Test case
Any override of this vfunc results in the following warning when called:
(buffertest.py:18458): Gtk-WARNING **: Invalid text buffer iterator: either the iterator is uninitialized, or the characters/pixbufs/widgets in the buffer have been modified since the iterator was created. You must use marks, character numbers, or line numbers to preserve a position across buffer modifications. You can apply tags and insert marks without invalidating your iterators, but any mutation that affects 'indexable' buffer contents (contents that can be referred to by character offset) will invalidate all outstanding iterators
I haven't figured out exactly what's required to trigger this; you'll see in the attached test case that a simple insert works, but if you type anything in the text view you should see this triggered straight away.
It's possible that this is a bug in GtkTextBuffer, but given that GtkSourceBuffer overrides this vfunc just fine, I'm guessing it's more likely an introspection issue.
Attachment 320520, "Test case":