def find_matches(self, prefix, end):
escaped = re.escape(prefix)
matches = []
while end > 0:
match = search.reverse_search(self.view,
r'^\s*{0}'.format(escaped),
0, end, flags=0)
if (match is None) or (len(matches) == self.MAX_MATCHES):
break
line = self.view.line(match.begin())
end = line.begin()
text = self.view.substr(line).lstrip()
if text not in matches:
matches.append(text)
return matches
评论列表
文章目录