Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes/No <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Version: 1.69 OS Version: Windows_NT x64 10.0. 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) ()) }) ! In this GIF, the insertText provided is . When the completion is accepted using Tab, the don't get accepted. If the code on the line is , the insertText is and the cursor is marked by , then the completion shows up as ! Example 2: A simpler case is when code on the line is , the completion shown is . 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
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.
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
https://user-
The autocomplete text no longer has the parentheses, but the description does. Is it expected that they don't get completed ?
You have to try this with the intellicode extension. I suggest to get this validated by
Were you able to repro the bug you found with the Intellicode-Completions extension installed? I cannot repro it on my end.

Discussion:
} for (const item of completions.items) { <del> const range = item.range ? Range.lift(item.range) : defaultReplaceRange; </del> <ins> let range = item.range ? Range.lift(item.range) : defaultReplaceRange; </ins> if (range.startLineNumber !== range.endLineNumber) { // Ignore invalid ranges.

model, languageConfigurationService ); <ins> // Modify range depending on if brackets are added or removed const diff = insertText.length - item.insertText.length; if (diff !== 0) { range = new Range(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn + diff); } </ins> } snippetInfo = undefined;