def _remove_old_lines_from_history(self):
        remove_above = max(0, self.pt_cursor_position.y - self.get_history_limit())
        data_buffer = self.pt_screen.data_buffer
        for line in list(data_buffer):
            if line < remove_above:
                data_buffer.pop(line, None)
Remove top from the scroll buffer. (Outside bounds of history limit.)
dataset/ETHPy150Open jonathanslenders/pymux/pymux/screen.py/BetterScreen._remove_old_lines_from_history