I’m trying to use
GtkTextBuffer along with
GtkTextTag to change the formatting of text. But all the examples I can find only show how I can use
GtkTextTag to change the formatting of text already in the buffer. How can I extend the
GtkTextTags at the cursor to whatever is inserted next?
Essentially, this is the same question as this post:
But that post received no responses, and I can’t reply to it anymore, so I’m trying again .
One way I thought of solving this was if I could connect my own signal handler to the “insert-text” signal after the default signal handler. By that point, the new text would be in the buffer, and I could extend the tags to the new text. But according to the documentation, the default signal handler runs last.
- Is there a way to insert my own signal handler after the default handler?
- Is there another way to accomplish this?