Skip to content

fix54092: return replacement ranges for completions on unclosed strings #57839

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
Mar 20, 2024

Conversation

iisaduan
Copy link
Member

fixes #54092.

Replacement ranges for string completions will be returned unless the closed string is empty (a single unclosed quote).

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Mar 19, 2024
//// a["[|foo.b/*3*/|]"
//// a["[|foo./*4*/b|]
//// a['[|foo./*5*/b|]
//// a[`[|foo./*6*/b|]
Copy link
Member

Choose a reason for hiding this comment

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

Can you add test cases for when you have foo. (no contents following the dot) and fo (no dot or following contents)?

Copy link
Member Author

@iisaduan iisaduan Mar 19, 2024

Choose a reason for hiding this comment

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

added! I also tested manually in vscode to see that the behavior didn't change for the previously working cases, even though it does return a replacementSpan now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Completion for string property doesn't include replacementSpan if string is unclosed
4 participants