-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
InlineCompletions API bracket completion - range is not updated when brackets are added/removed #156312
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.69.2. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
Thanks for the issue and the PR! I'll get it in in the next release, as we already have feature-freeze and focus on fixing bugs in new features. |
@hediet hmm should this be assigned to the July milestone since i see it is merged to main? And thus it will be part of the upcoming stable release in 10 days? Thanks |
tab.mov |
The autocomplete text no longer has the parentheses, but the description does. Is it expected that they don't get completed @hediet ? |
You have to try this with the intellicode extension. I suggest to get this validated by @juihanamshet1 |
@meganrogge Were you able to repro the bug you found with the Intellicode-Completions extension installed? I cannot repro it on my end. |
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
When the completion contains incomplete bracketPairs, the VS Code API corrects them, but the range is not updated so the tabbing behavior doesn't work as expected. Additionally, the grey text shown is also not shown accurately.
Example 1:
The code context is
React.useEffect(() => {
fetch("/api")
.then((res) => res.json())
})
In this GIF, the insertText provided is
res.json())
. When the completion is accepted using Tab, the()
don't get accepted.If the code on the line is
.then((res) => res.|)
, the insertText isres.json())
and the cursor is marked by|
, then the completion shows up asExample 2:
A simpler case is when code on the line is
React.useE
, the completion shown isReact.useEffect(() => {})
. When the user hits Tab to accept, their cursor is taken between{}
. If the insertText is{
at this point, it will be closed by the API. But the range is not updated to match the already existing}
and so it shows up as grey text.cc @hediet
The text was updated successfully, but these errors were encountered: