- gtk_text_view_scroll_to_mark( GTK_TEXT_VIEW(m_text),
- gtk_text_buffer_get_insert( m_buffer ), 0.0, FALSE, 0.0, 1.0 );
+ GtkAdjustment* adj = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(m_widget));
+ const double value = gtk_adjustment_get_value(adj);
+ const double upper = gtk_adjustment_get_upper(adj);
+ const double page_size = gtk_adjustment_get_page_size(adj);
+ if (wxIsSameDouble(value, upper - page_size))
+ {
+ gtk_text_view_scroll_to_mark(GTK_TEXT_VIEW(m_text),
+ gtk_text_buffer_get_insert(m_buffer), 0, false, 0, 1);
+ }