Use smartcase in search.
This commit is contained in:
parent
b114257bdd
commit
d16c92c681
@ -97,8 +97,12 @@ class SearchPassService(dbus.service.Object):
|
||||
if filename[-4:] != '.gpg':
|
||||
continue
|
||||
path = path_join(dir_path, filename)[:-4]
|
||||
for name in path.split('/'):
|
||||
matcher.set_seq1(name)
|
||||
for part in path.split('/'):
|
||||
# smartcase: be case insensitive unless uppercase
|
||||
# characters are used in the search
|
||||
if name.islower():
|
||||
part = part.lower()
|
||||
matcher.set_seq1(part)
|
||||
score = matcher.ratio()
|
||||
if score >= 0.5 and \
|
||||
(path not in matches or score > matches[path]):
|
||||
|
Loading…
x
Reference in New Issue
Block a user