gtk_text_buffer_insert_at_cursor in "insert-text"



Hi!

I am trying to insert tab characters into a GtkTextView using gtk_text_buffer_insert_at_cursor from within 
the "insert-text" signal handler so that my text editor can support automatic indentation.
                                
  gtk_text_buffer_insert_at_cursor (
    instance ()._data,
    instance ()._indentation,
    g_utf8_strlen (instance ()._indentation, -1)
  );

However, I keep getting strange warnings about the iterator position being invalid. These warnings appear to 
occur within the GTK runtime after my signal handler has returned. I have tried copying the cursor iterator 
and calling gtk_text_buffer_insert, but the warnings persist. Am I not supposed to modify the text buffer's 
contents from within "insert-text" handlers? If not, how should I implement automatic indentation?

 - Michael Matthews

-- 
_______________________________________________

Search for businesses by name, location, or phone number.  -Lycos Yellow Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]