Re: Possible bug in gtktextbtree.c



--- Havoc Pennington <hp redhat com> wrote:
> 
> Dirk Vangestel <dirk_vangestel yahoo com> writes:
> > I've been trying to use the new editor in gtk+1.3,
> but
> > I seem to have run into a problem. The function
> > gtk_text_buffer_get_text_chars does not return any
> > characters if the start and end position are in
> the
> > same segment. I think the cause is the function
> > gtk_text_btree_get_text.
> > If you look at this code, there is a
> > while (seg != end_seg)
> > loop which obviously doesn't do anything if the
> start
> > and end segments are the same. So I added the
> > following code before the while:
> > if (seg == end_seg)
> >   {
> >     copy_segment(retval, include_hidden,
> >                  include_nonchars, &iter, &end);
> >   }
> > which made my program work... I don't know if it's
> the
> > right way to fix it though.
> > 
> 
> What version of the code do you have? I believe I
> fixed this a while
> ago, by adding a copy_segment() after the while
> loop. It was checked
> into CVS on July 25.

I used 1.3.1. I tried to get the CVS version, but was
unable to do so... Connection speed was way too low.
I'll try again, and let you know whether the bug is
fixed.

> (I feel bad that you had to figure out the btree if
> the bug is already
> fixed! That could not have been a fun debugging
> session...)
> 
> Havoc

It wasn't too bad... The problem was easy to trace.

Dirk


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/




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