Re: scrolling logs in GtkTextView to the end (Re: scrolling windo ws)



On Thu, Mar 06, 2003 at 10:13:04AM -0000, martyn 2 russell bt com wrote: 
While this may be true, I still think that if you insert text, the iter
should be updated because it is quite likely that you will want to scroll to
the end of the text when the text buffer has changed.


I don't know what you mean by "iter should be updated" - the iterator
is not persistent in any way. That's why you need to use a mark such
as the insertion mark, because the mark sticks around.

You should just need to do:

 gtk_text_view_scroll_mark_onscreen (text_view, 
                                     gtk_text_buffer_get_insert (buffer));

That is supposed to work, if the cursor is at the end of the buffer.

Havoc



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