vscode icon indicating copy to clipboard operation
vscode copied to clipboard

[regression] Code completion of string in JSON file produces extra quote

Open HighCommander4 opened this issue 4 months ago • 1 comments

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.94.2
  • OS Version: Debian 11

Steps to Reproduce

  1. Create a file named test.json with the following content (^ indicates the cursor location):
    {
      "values": [
        {
          "key": "value"
        },
        {
          ^
        }
      ]
    }
    
  2. At the indicated cursor location (^), type a double quote ("). Note that this causes vscode to auto-insert a second quote after the cursor. (This, in and of itself, is fine.)
  3. Trigger code completion (if it's not triggerred automatically). Select key which is offered as a result.

Actual results

The resulting file content is:

{
  "values": [
    {
      "key": "value"
    },
    {
      "key""
    }
  ]
}

Not the extra quote after "key".

Expected results

The resulting file content is:

{
  "values": [
    {
      "key": "value"
    },
    {
      "key"
    }
  ]
}

This is a regression in vscode 1.94 compared to 1.93.

HighCommander4 avatar Oct 20 '24 00:10 HighCommander4