search case insensitive

This commit is contained in:
chrys 2019-02-12 23:18:16 +01:00
parent 6fd2f60d66
commit 1922a47cb5

View File

@ -48,14 +48,14 @@ class vmenuManager():
if self.useTimeout: if self.useTimeout:
if time.time() - self.lastSearchTime > 1: if time.time() - self.lastSearchTime > 1:
self.clearSearchText() self.clearSearchText()
self.searchText += value self.searchText += value.upper()
self.lastSearchTime = time.time() self.lastSearchTime = time.time()
startIndex = self.getCurrIndex() startIndex = self.getCurrIndex()
while True: while True:
if not self.nextIndex(): if not self.nextIndex():
return '' return ''
entry = self.getCurrentEntry() entry = self.getCurrentEntry()
if entry.startswith(self.searchText): if entry.upper().startswith(self.searchText):
return entry return entry
if startIndex == self.getCurrIndex(): if startIndex == self.getCurrIndex():
return '' return ''