Skip to content

Commit e57a4cc

Browse files
author
Sascha Goldhofer
committed
Remove own regex on filter suggestions
1 parent 4a8e1d0 commit e57a4cc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

project/FileCache.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ def search_completions(self, needle, project_folder, valid_extensions, base_path
7676
properties[1] = file extension, like "html"
7777
properties[2] = file displayed as suggestion, like 'test/mock/project/index html'
7878
"""
79-
if ((properties[1] in valid_extensions or "*" in valid_extensions) and re.match(regex, filepath, re.IGNORECASE)):
79+
"""
80+
funny: the regex matched here is also matched again by Sublime itself. thus returning all
81+
filepaths is as good as filtering them before, with the exception that the first one is incredibly
82+
faster...
83+
"""
84+
#if ((properties[1] in valid_extensions or "*" in valid_extensions)) and re.match(regex, filepath, re.IGNORECASE)):
85+
if ((properties[1] in valid_extensions or "*" in valid_extensions)):
8086
completion = self.get_completion(filepath, base_path)
8187
result.append(completion)
8288

0 commit comments

Comments
 (0)