completion: Match case-insensitively.
This commit is contained in:
parent
e3e1382ccd
commit
8dffceeb2a
@ -59,6 +59,8 @@ class BaseCompletionModel(QStandardItemModel):
|
||||
marks = []
|
||||
if not needle:
|
||||
return marks
|
||||
needle = needle.casefold()
|
||||
haystack = haystack.casefold()
|
||||
while True:
|
||||
pos1 = haystack.find(needle, pos2)
|
||||
if pos1 == -1:
|
||||
|
@ -141,7 +141,7 @@ class CompletionFilterModel(QSortFilterProxyModel):
|
||||
# TODO more sophisticated filtering
|
||||
if not self._pattern:
|
||||
return True
|
||||
return self._pattern in data
|
||||
return self._pattern.casefold() in data.casefold()
|
||||
|
||||
def lessThan(self, lindex, rindex):
|
||||
"""Custom sorting implementation.
|
||||
|
Loading…
Reference in New Issue
Block a user