'Go back in the history.'

def history_prev(self):

    try:
        if (not self._history.is_browsing()):
            item = self._history.start(self.text().strip())
        else:
            item = self._history.previtem()
    except (cmdhistory.HistoryEmptyError, cmdhistory.HistoryEndReachedError):
        return
    self.setText(item)
