Changing GtkTextTags?



Is it possible to change the attributes of a GtkTextTag? When I try to
use g_object_set() on a tag, I get the following warnings:

Gtk-CRITICAL **: file gtktextbtree.c: line 3581
(_gtk_text_line_byte_locate): assertion `byte_offset >= 0' failed

Gtk-ERROR **: Byte index -1 is off the end of the line

The former warning is because the byte_offset being passed in is -1. The
byte_offset is passed in pretty straight from
_gtk_text_btree_get_iter_at_last_toggle(), which calls line =
_gtk_text_btree_last_could_contain_tag (tree, tag). If line is NULL, it
passes 0 as the byte offset. If not (as it is in my case), it passes -1.
The second error is caused by much the same thing. The code path is
pretty straightforward, so I figure I either can't set it or it's a bug.

Joe




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