Skip to content

Add support for parenthesis in "when" conditionsΒ #91473

@Veetaha

Description

@Veetaha
  • VSCode Version: 1.42.0
  • OS Version: Ubuntu 18.04.3

The when expression that contains parentheses which we set for a keybinding defined in the contribution point of our extension results into a corrupted (invalidly transformed expression in user's keybinding settings), e.g. the following declaration:

{
    "command": "extension.helloWorld",
    "key": "enter",
    "when": "editorLangId == rust && !suggestWidgetVisible && (!vim.active || vim.mode == 'Insert')"
}

produces the following invalid when expression:

Steps to Reproduce:

  1. Go to the following repo with the reproduction
  2. Follow the steps in README.md

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions