Skip to content

[Bug] Empty ending bracket in "surroundingPairs" results in bad selection range #206774

@RedCMD

Description

@RedCMD

add a bracket pair to "surroundingPairs" under language-configuration.json, with the end bracket being empty/blank

"surroundingPairs": [
    [ "(", "" ]
]

Make a selection around some text and press (
image

Expected: ✅
resulting selection is still around text
image

Actual: ❌
resulting selection ends up being moved 1 to the left
image

This could have been used as a workaround for #202386

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-autoclosingEditor automatic closing of parens / brackets / etc.insiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions