On Sun, 24 Sep 2006 14:29:35 +0100, Kouhei Sutou <kou@...> wrot=
> Edwin <edder@...> wrote:
>> Does anyone know how to delete a child_anchor from a text buffer. I r=
>> something about unreffing it, but couldn't figure out how.
> Use Gtk::TextBuffer#delete.
> start_iter =3D buffer.get_iter_at_child_anchor(anchor)
> end_iter =3D buffer.get_iter_at_child_anchor(anchor)
> buffer.delete(start_iter, end_iter)
Thanks, this works:
But earlier I tried something very similar:
start_iter =3D buffer.get_iter_at_child_anchor(anchor)
end_iter =3D buffer.get_iter_at_offset( start_iter.offset + 1 )
and that didn't work. Any idea why?
> Gtk::ChildAnchor is represented as a char. See:
>> On a related note there seems to be a bug in get_iter_at_child_anchor=
>> contrast to the documentation I need to provide two arguments to the
>> method, although as far as I can tell it only uses the first argument=
> You're right. I fixed the bug.