1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Restored regex_flags to match_consecutive

This commit is contained in:
Calum Smith 2016-10-03 01:59:37 -04:00
parent 575b14a13f
commit 463ad780de

View File

@ -40,6 +40,7 @@ def match_anywhere(needles, haystack, ignore_case=False):
regex_some_seps = '.*' + os.sep + '.*' regex_some_seps = '.*' + os.sep + '.*'
regex_no_sep_end = '[^' + os.sep + ']*$' regex_no_sep_end = '[^' + os.sep + ']*$'
regex_needle = regex_some_seps.join(imap(re.escape, needles)) + regex_no_sep_end regex_needle = regex_some_seps.join(imap(re.escape, needles)) + regex_no_sep_end
regex_flags = re.IGNORECASE | re.UNICODE if ignore_case else re.UNICODE
found = lambda haystack: re.search( found = lambda haystack: re.search(
regex_needle, regex_needle,
haystack.path, haystack.path,