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

Swap both elements of a pair together #81

Merged
merged 1 commit into from
Oct 24, 2024
Merged

Conversation

julienvincent
Copy link
Owner

Currently when performing a swap, each element in a pair is swapped with it's corresponding paired element.

This works for simple cases but breaks when the number of lines are different between the two pairs as the ranges the nodes represent have now changed from previous edits.

This fixes the issue by finding the full range represented by both elements in a pair and swapping this entire range in one go.

Currently when performing a swap, each element in a pair is swapped with
it's corresponding paired element.

This works for simple cases but breaks when the number of lines are
different between the two pairs as the ranges the nodes represent have
now changed from previous edits.

This fixes the issue by finding the full range represented by both
elements in a pair and swapping this entire range in one go.
@julienvincent julienvincent merged commit 0fadfa5 into master Oct 24, 2024
3 checks passed
@julienvincent julienvincent deleted the jv/ref-xwwsomnyppml branch October 24, 2024 23:10
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.

1 participant