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

Jump to end char of surrounding pair from any cursor pos #1121

Merged
merged 7 commits into from
Nov 20, 2021

Conversation

s1ck
Copy link
Contributor

@s1ck s1ck commented Nov 17, 2021

This partially solves #1072

The change allows the user to use mm from any position between the surrounding pair.
The idea is to traverse the tree until the leaf node for the given cursor position is found.
Once the leaf is found, we traverse the parents until we find the first surrounded parent.

This PR does not solve m[i,a]m from an arbitrary cursor position.

helix-core/src/match_brackets.rs Outdated Show resolved Hide resolved
helix-core/src/match_brackets.rs Outdated Show resolved Hide resolved
Copy link
Member

@archseer archseer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@archseer archseer merged commit a3a3b0b into helix-editor:master Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants