textview iter_inside_word bug?

Inserting large blocks of spaces somehow confuses
gtk_text_iter_inside_word(), having it report you're within a word even when
you haven't even typed any letters.

To reproduce:
run attached test case, click on the text box, hit space about ten times
and watch the console.  This prints the status of the iterator at the
insert position every time you type.
To understand the output, read the code.  It's pretty simple.

It only seems to occur when the spaces are at the beginning of a
line...?  Try typing some letters, then holding down the space bar.
It may be related to the number of spaces equalling a tab?
But I can't get any consistent behavior out of it-- sometimes I get big
blocks of "i"s in a row, other times they're broken up.

(This may be related, too:  the insert-text signal on a GtkTextBuffer is
incorrectly documented as taking a GtkTextIter as an argument, when in
fact it appears to take a GtkTextIter*.  If you try to use a passed
GtkTextIter you get a pile of errors, while if you use a GtkTextIter*
everything works as expected with the exception of this bug.
Additionally, a cursory glance at the code shows the insert_at_cursor
signal on a GtkTextView [View, not Buffer] doesn't seem to be used for

If you're wondering why I care:
I'm rewriting GtkSpell (http://gtkspell.sourceforge.net, used in GAIM
and GnomeICU among others) for GTK2.  Almost everything works but I
have a few final bugs related to some corner cases...

      Evan Martin
martine cs washington edu

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