code: def history_backward(self, count=1):
          
          self._set_history_search()
  
          # Go back in history.
          found_something = False
  
          for i in range(self.working_index - 1, -1, -1):
              if self._history_matches(i):
                  self.working_index = i
                  count -= 1
                  found_something = True
              if count == 0:
                  break
  
          # If we move to another entry, move cursor to the end of the line.
          if found_something:
              self.cursor_position = len(self.text)
docs: Move backwards through history.