Fixed a bug in the shell history handling.

Thu, 23 Nov 2017 17:42:13 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 23 Nov 2017 17:42:13 +0100
changeset 5991
1ab3f4de8a4b
parent 5990
60022b63b51c
child 5992
d184ca2d3a95

Fixed a bug in the shell history handling.

QScintilla/Shell.py file | annotate | diff | comparison | revisions
--- a/QScintilla/Shell.py	Wed Nov 22 18:10:58 2017 +0100
+++ b/QScintilla/Shell.py	Thu Nov 23 17:42:13 2017 +0100
@@ -1603,7 +1603,8 @@
                     self.__setHistoryIndex(index=-1)
                 elif self.__historyStyle == ShellHistoryStyle.WindowsStyle:
                     if historyIndex is None:
-                        if cmd != self.__history[self.__histidx - 1]:
+                        if bool(self.__histidx - 1) and \
+                           cmd != self.__history[self.__histidx - 1]:
                             self.__setHistoryIndex(index=-1)
                     else:
                         self.__setHistoryIndex(historyIndex)

eric ide

mercurial