--- a/eric6/QScintilla/Shell.py Tue Apr 13 18:02:59 2021 +0200 +++ b/eric6/QScintilla/Shell.py Tue Apr 13 19:59:17 2021 +0200 @@ -1962,10 +1962,7 @@ that something was found @rtype tuple of (int, bool) """ - if startIdx == -1: - idx = 0 - else: - idx = startIdx + 1 + idx = 0 if startIdx == -1 else startIdx + 1 while ( idx < len(self.__history) and not self.__history[idx].startswith(txt) @@ -1987,10 +1984,7 @@ that something was found @rtype tuple of (int, bool) """ - if startIdx == -1: - idx = len(self.__history) - 1 - else: - idx = startIdx - 1 + idx = len(self.__history) - 1 if startIdx == -1 else startIdx - 1 while ( idx >= 0 and not self.__history[idx].startswith(txt)