[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: gtk_text_buffer_place_cursor
- From: Havoc Pennington <hp redhat com>
- To: Philip Bunce <pjb carmel com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gtk_text_buffer_place_cursor
- Date: 25 Mar 2002 17:35:52 -0500
Philip Bunce <pjb@carmel.com> writes:
>
> I have an application (using gtk2.0 on win32) that uses a TextView window. However, I want to force all text to be added
> to the end of the buffer (like a terminal session). By using get_end_iter and buffer_insert I was able to make sure that
> any new text goes at the end of the buffer, but the user can leave the cursor somewhere else and it looks weird. So I want
> to move the cursor to the end of the buffer also. So I used
>
> gtk_text_buffer_get_end_iter(view->buffer, &iter);
> gtk_text_buffer_place_cursor (view->buffer, &iter);
> gtk_text_buffer_insert_at_cursor (view->buffer, msg, len);
>
> But I get lots of error messages from Pango.
>
> <unknown> (pid:2248): ** CRITICAL **: file pango-layout.c: line 1707 (pango_layout_get_cursor_pos): assertion `index >= 0 && index <= layout->length' failed
>
> The message seems to suggest that the end iter is past the end of the buffer, but how can that be?
>
> Oh yes. The code does actually work, despite the huge volume of error messages.
>
Some sort of bug - be sure it's in the tracker at
http://bugzilla.gnome.org
May be win32-only.
Havoc
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]