Skip to content

fix: properly handle multiple changes at once #389

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

Merged
merged 5 commits into from
May 6, 2025
Merged

Conversation

psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented May 5, 2025

multiple changes at once happen during search and replace operations.

Right now, we are handling each individually, one after another. this breaks starting at the second change because the range of each change is always related to the original state, not the previous. after fiddling with the apply_change method I figured this solution is the easiest. it expects that all changes are ordered properly, but afaik that's reasonable. if not and we receive bug reports, we can simply sort them.

EDIT: ahh I need to handle the deletions case too! ✅

@psteinroe psteinroe requested a review from juleswritescode May 5, 2025 18:37
@psteinroe psteinroe marked this pull request as draft May 5, 2025 18:45
@psteinroe psteinroe removed the request for review from juleswritescode May 5, 2025 18:45
@psteinroe psteinroe requested a review from juleswritescode May 6, 2025 06:07
@psteinroe psteinroe marked this pull request as ready for review May 6, 2025 06:07
Copy link
Collaborator

@juleswritescode juleswritescode left a comment

Choose a reason for hiding this comment

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

Good catch, jesus! :D

@psteinroe psteinroe merged commit 6469ce3 into main May 6, 2025
7 checks passed
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.

2 participants