Re: Possible bug in gtktextbtree.c
- From: Havoc Pennington <hp redhat com>
- To: Dirk Vangestel <dirk_vangestel yahoo com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Possible bug in gtktextbtree.c
- Date: 04 Sep 2000 16:10:50 -0400
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 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]