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

Skip enclosed pairs in surround #357

Merged
merged 1 commit into from
Jun 24, 2021

Conversation

sudormrfbin
Copy link
Member

Surround operations previously ignored other pairs that are enclosed within which should be skipped. For example if the cursor is on the , in {{a},{b}}, doing md{ previously would delete the { on the left of a and } on the right of b instead of the outermost braces. This commit corrects this behavior.

@CBenoit
Copy link
Member

CBenoit commented Jun 23, 2021

Nice! I was going to open an issue for that 😆
Weird edge cases I was testing on my side are working properly now!

helix-core/src/surround.rs Outdated Show resolved Hide resolved
Surround operations previously ignored other pairs that are
enclosed within which should be skipped. For example if the
cursor is on the `,` in `{{a},{b}}`, doing `md{` previously
would delete the `{` on the left of `a` and `}` on the right
of `b` instead of the outermost braces. This commit corrects
this behavior.
@sudormrfbin
Copy link
Member Author

Nice! I was going to open an issue for that 😆
Weird edge cases I was testing on my side are working properly now!

I thought I would have to use treesitter to pull it off but it was actually a simple fix 😄

@archseer archseer merged commit 394629a into helix-editor:master Jun 24, 2021
@sudormrfbin sudormrfbin mentioned this pull request Jun 27, 2021
7 tasks
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.

3 participants