def _scroll_to_end(self):
        """Scroll to the end of the document."""
        end_scroll = (self._control.verticalScrollBar().maximum()
                      - self._control.verticalScrollBar().pageStep())
        # Only scroll down
        if end_scroll > self._control.verticalScrollBar().value():
            self._control.verticalScrollBar().setValue(end_scroll)
Scroll to the end of the document.
angrmanagement/vendor/qtconsole/console_widget.py