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 offset conversion for end of file #100

Merged
merged 1 commit into from
Aug 6, 2023

Conversation

maurobalbi
Copy link
Contributor

This PR fixes a bug, which converts the offset to a wrong line/col at the end of the file.
E.g. for "x", offset 1 is converted to line 1 col 0, instead of line 0 col 1.

@maurobalbi maurobalbi changed the title Fix range conversion for end of file Fix offset conversion for end of file Aug 5, 2023
Copy link
Owner

@oxalica oxalica left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. Just some nitpicking suggestions. Also please squash the commits after the change.

crates/nil/src/vfs.rs Outdated Show resolved Hide resolved
crates/nil/src/vfs.rs Outdated Show resolved Hide resolved
crates/nil/src/vfs.rs Outdated Show resolved Hide resolved
@maurobalbi maurobalbi requested a review from oxalica August 6, 2023 07:23
@oxalica oxalica merged commit 175c791 into oxalica:main Aug 6, 2023
10 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