Add text commit hooks to GtkTextBuffer
One thing that is increasingly complex is dealing with text changes from signal callbacks in GtkTextBuffer. People often do things they very much should not do from these callbacks which makes it practically impossible to track changes for external code in a reliable manner.
This was one of the reasons that GtkTextHistory was put in GtkTextBuffer directly.
In Builder, we have something to help with this so our plugins that only need to track changes cannot run into signal connection/disconnection ordering issues. It's called a TextCommitFunc and you can register a set of them for the textbuffer.
We should determine if this is something we want in GtkTextBuffer itself. GtkTextHistory could be made to use it as well as libspelling, GtkSourceView, Builder, etc.