code: def auto_down(self, count=1, go_to_start_of_line_if_history_changes=False):
          
          if self.complete_state:
              self.complete_next(count=count)
          elif self.document.cursor_position_row < self.document.line_count - 1:
              self.cursor_down(count=count)
          elif not self.selection_state:
              self.history_forward(count=count)
  
              # Go to the start of the line?
              if go_to_start_of_line_if_history_changes:
                  self.cursor_position += self.document.get_start_of_line_position()
docs: If we're not on the last line (of a multiline input) go a line down,
          otherwise go forward in history. (If nothing is selected.)