def __useHistory(self):
        """
        Private method to display a command from the _history.
        """
        if self.histidx < len(self._history):
            cmd = self._history[self.histidx]
        else:
            cmd = QtCore.QString()
            self.incrementalSearchString = ""
            self.incrementalSearchActive = False

        self.setCursorPosition(self.prline, self.prcol + len(self.more and sys.ps1 or sys.ps2))
        self.setSelection(self.prline,self.prcol,\
                          self.prline,self.lineLength(self.prline))
        self.removeSelectedText()
        self.__insertText(cmd)
dataset/ETHPy150Open ilastik/ilastik-0.5/ilastik/modules/interactive_console/gui/shellWidget.py/SciShell.__useHistory/original