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

fix: Fix a logic error in suffix calculation for text changes #423

Merged
merged 1 commit into from
May 27, 2024

Conversation

mwcampbell
Copy link
Contributor

To reproduce the bug, add two newlines to the end of an empty multi-line edit control. When the second newline is added, the old text will be "\n" and the new text will be "\n\n". Before this fix, the function mistakely calculated 1 byte as a common suffix since both strings ended with a newline, even though that same newline in the old string was also the common prefix.

Copy link
Member

@DataTriny DataTriny 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!

@DataTriny DataTriny merged commit 1121723 into main May 27, 2024
10 checks passed
@DataTriny DataTriny deleted the atspi-text-change-suffix-fix branch May 27, 2024 18:01
@mwcampbell mwcampbell mentioned this pull request May 27, 2024
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