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: inlay hint position sometimes off by one #2079

Merged

Conversation

BlueGreenMagick
Copy link
Contributor

Continued from PR #2070
Fixes issue #1988

Inlay hint position is sometimes off by 1 as mentioned in #2070

This code detects if inlay hint position is off by 1 by checking source[position]. It is off by one if kind == InlayHintKind.Type, and source[position] is not a valid character that comes after an identifier.

A valid character that can come after an identifier, is ascii characters that is not alphanumeric A-Z(x41-x5A), a-z(x61-x7A), 0-9(x30-x39), or special characters '$'(x24), '_'(x5F), '\'(x5C).

@BlueGreenMagick
Copy link
Contributor Author

Fixed lint

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

Thank you!

@dummdidumm dummdidumm merged commit 66d1b14 into sveltejs:master Jul 5, 2023
2 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