Indeed, gtk_text_buffer_insert_with_tags_by_name() does what it says. What I was talking about was (in some future Textview) applying the tag to an iter, then whenever the insert point was on that iter, it would inherit the tag properties set there. So typing at that point gets the formatting.
Have you tried gtk_text_buffer_insert_with_tags_by_name() to insert text with a tag at an iter? What tag combo do you use to get the cursor to bounce around? If I test having two indent tags on the same line, the first one applied wins out. This is what I tested with. Eric /* gcc -Wall
Heh-heh, yes that for loop does look better :-) I'll use that. Textview is awesome and will save me thousands of lines of code, but not being able to apply a tag to an iter -- that has been a big drawback for me. You can discover a tag at an iter, but only apply/remove it to a range. It would
Hi Doug, I made a bit of a pointer mess there. Not the best of answers or way to go about iterating through a list. Looking at some GTK code, this is better done with a for loop. As usual, you don't want to move the pointer you get from gtk_text_iter_get_tags() and then free it. This will
Eric, thanks again. I ended up using g_signal_connect() on "key-press-event" (instead of "insert-text"). This makes it easier IMO to handle specific cases, since the callback fn can return TRUE if it did anything or FALSE to get GTK default behavior, unlike void insert-text fn. Plus if you