docs: def draw(self):
          """draw the curses ui on the screen, handle scroll if needed"""
          self.screen.clear()
  
          x, y = 1, 1  # start point
          max_y, max_x = self.screen.getmaxyx()
          max_rows = max_y - y  # the max rows we can draw
  
          lines, current_line = self.get_lines()
  
          # calculate how many lines we should scroll, relative to the top
          scroll_top = getattr(self, 'scroll_top', 0)
          if current_line <= scroll_top:
              scroll_top = 0
          elif current_line - scroll_top > max_rows:
              scroll_top = current_line - max_rows
          self.scroll_top = scroll_top
  
          lines_to_draw = lines[scroll_top:scroll_top+max_rows]
  
          for line in lines_to_draw:
              if type(line) is tuple:
                  self.screen.addnstr(y, x, line[0], max_x-2, line[1])
              else:
                  self.screen.addnstr(y, x, line, max_x-2)
              y += 1
  
          self.screen.refresh()