The layout is the following:
There is a Gtk::ScrollWindow and inside of it is Gtk::TextView, the latter is of a derived class called TextArea.
As a test, there is a button that adds some texgt to the TextView one line at the time and attempts to immediately scroll to the bottom.
The code:
void MainWindow::onButtonPress()
{
Glib::RefPtr<Gtk::TextBuffer::Tag> boldTag = Gtk::TextBuffer::Tag::create();
boldTag->property_weight()=800;
textarea->get_buffer()->get_tag_table()->add(boldTag);
textarea->get_buffer()->insert_with_tag(textarea->get_buffer()->end(), "\ntest text", boldTag);
auto iter = textarea->get_buffer()->end();
iter.set_line_offset(0);
textarea->scroll_to(iter);
}
The funny thing is that the scrolling does take place, but not to the last line, only to the line second to last. A silly attempt to add -1 as the offset creates an instant error, since the value must be non-negative.