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

Don't return trigger characters for ambient JS suggestions #130727

Merged
merged 1 commit into from Aug 13, 2021

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented Aug 12, 2021

Fixes #130096

JS files include their own version of word based suggestions. These include every symbol name in the current file (even if the symbol is not in scope).

These suggestions are incorrectly being returned in cases such as:

const abc = 1

({  |  })

When you type . at the |, TS likely should not be returning these suggestions (microsoft/TypeScript#45436) but this is not a recent regression

What changed however is that in 76885d7, I simplified our logic around commit characters to make it behave more consistently. In the spread cases above, this results in typing the second . committing the currently selected word based suggestion

My fix is to simply disable commit characters for the word based suggestions. This is how they behaved before 76885d7

@mjbvz mjbvz added this to the July 2021 Recovery milestone Aug 12, 2021
@mjbvz mjbvz self-assigned this Aug 12, 2021
@mjbvz mjbvz merged commit 2a4e065 into microsoft:release/1.59 Aug 13, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants