1960 @type int |
1960 @type int |
1961 @return tuple containing the index of found entry and a flag indicating |
1961 @return tuple containing the index of found entry and a flag indicating |
1962 that something was found |
1962 that something was found |
1963 @rtype tuple of (int, bool) |
1963 @rtype tuple of (int, bool) |
1964 """ |
1964 """ |
1965 if startIdx == -1: |
1965 idx = 0 if startIdx == -1 else startIdx + 1 |
1966 idx = 0 |
|
1967 else: |
|
1968 idx = startIdx + 1 |
|
1969 while ( |
1966 while ( |
1970 idx < len(self.__history) and |
1967 idx < len(self.__history) and |
1971 not self.__history[idx].startswith(txt) |
1968 not self.__history[idx].startswith(txt) |
1972 ): |
1969 ): |
1973 idx += 1 |
1970 idx += 1 |
1985 @type int |
1982 @type int |
1986 @return tuple containing the index of found entry and a flag indicating |
1983 @return tuple containing the index of found entry and a flag indicating |
1987 that something was found |
1984 that something was found |
1988 @rtype tuple of (int, bool) |
1985 @rtype tuple of (int, bool) |
1989 """ |
1986 """ |
1990 if startIdx == -1: |
1987 idx = len(self.__history) - 1 if startIdx == -1 else startIdx - 1 |
1991 idx = len(self.__history) - 1 |
|
1992 else: |
|
1993 idx = startIdx - 1 |
|
1994 while ( |
1988 while ( |
1995 idx >= 0 and |
1989 idx >= 0 and |
1996 not self.__history[idx].startswith(txt) |
1990 not self.__history[idx].startswith(txt) |
1997 ): |
1991 ): |
1998 idx -= 1 |
1992 idx -= 1 |