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 WideChar offsets calculation in line-index #16041

Merged
merged 2 commits into from Dec 7, 2023

Conversation

roife
Copy link
Contributor

@roife roife commented Dec 7, 2023

Fix #15981. This PR addresses the issue with the WideChar's offset calculation, ensuring accurate line-specific positions during text analysis in the lib/line-index module.

Changes Made

  • Corrected the calculation for WideChar offsets, ensuring they reflect positions within respective lines.
  • Added tests to verify the accuracy of WideChar offset calculations, and correct existing tests.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2023
@Veykril
Copy link
Member

Veykril commented Dec 7, 2023

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Dec 7, 2023

📌 Commit a011b6c has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Dec 7, 2023

⌛ Testing commit a011b6c with merge 9975650...

@bors
Copy link
Collaborator

bors commented Dec 7, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 9975650 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Dec 7, 2023

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 9975650 to master...

@bors bors merged commit 9975650 into rust-lang:master Dec 7, 2023
10 checks passed
@bors
Copy link
Collaborator

bors commented Dec 7, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

@roife roife deleted the fix-line-index-widechar branch December 7, 2023 18:53
@roife roife restored the fix-line-index-widechar branch December 7, 2023 18:59
@roife
Copy link
Contributor Author

roife commented Dec 7, 2023

👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request.

Oh, what error is this, and is there anything I need to do?

@Veykril
Copy link
Member

Veykril commented Dec 7, 2023

That can be ignored dw

@roife roife deleted the fix-line-index-widechar branch December 8, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lib/line-index 0.1.0 has a bug when handling wide characters
4 participants