QScintilla/Shell.py

branch
maintenance
changeset 6004
548a9ba8c970
parent 5825
9487c08b6a23
parent 5991
1ab3f4de8a4b
child 6050
25a4ddb25ca4
diff -r ab851fd69434 -r 548a9ba8c970 QScintilla/Shell.py
--- a/QScintilla/Shell.py	Sun Nov 19 13:06:01 2017 +0100
+++ b/QScintilla/Shell.py	Sat Dec 02 12:40:22 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