Is there any way to test if the last line in a TextView/TextBuffer is visible in the containing ScrollWindow?
I have a TextView which contains log lines for a process, and I am currently using scroll_to_mark( ) to keep the last line visible as I add lines. This works well, but I want to NOT scroll if the user has scrolled upward and is looking at earlier lines.
I’m working in Python, but comments about doing this in C would be helpful, too.
I think I need to test if the last line is visible, and if it is, then scroll when I add a new line. If the last line is not visible, then I won’t force the scrolling.