Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flags to view.find_all function call #773

Merged
merged 1 commit into from Jun 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion nv/polyfill.py
Expand Up @@ -88,7 +88,7 @@ def view_find(view, pattern: str, start_pt: int, flags: int = 0):
# There's no Sublime API to find patterns in reverse direction.
# See: https://github.com/SublimeTextIssues/Core/issues/245.
def view_rfind_all(view, pattern: str, start_pt: int, flags: int = 0):
matches = view.find_all(pattern)
matches = view.find_all(pattern, flags)
for region in matches:
if region.b > start_pt:
return reversed(matches[:matches.index(region)])
Expand Down