Inserts the previous command from history into the line.

def insertPreviousCommand(self):
        """
        Inserts the previous command from history into the line.
        """
        self._currentHistoryIndex -= 1
        if 0 <= self._currentHistoryIndex < len(self._history):
            cmd = self._history[self._currentHistoryIndex]
        else:
            cmd = '>>> '
            self._currentHistoryIndex = len(self._history)
        
        self.replaceCommand(cmd)