QScintilla/Shell.py

changeset 5991
1ab3f4de8a4b
parent 5800
c3379bf35654
child 6004
548a9ba8c970
child 6029
0ce26b97e2c0
diff -r 60022b63b51c -r 1ab3f4de8a4b QScintilla/Shell.py
--- 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