Keybinding issue since v1.6.29

Hi,

I’ve run into a weird behavior after updating to v1.6.30: I can’t change or delete the extension’s default binding of “Execute Code in REPL” (Ctrl+Enter). If I try to set a new binding, it is added to the default one instead of changing it.

This is frustrating, because it masks VS Code’s shortcut for inserting a new line. I had to roll back to v1.6.28 (the issue also seems to occur in v1.6.29).

Anyone else is experiencing this?

Yes, there are some more bindings behaving this way, e.g., Change Current Environment. I’m on v1.6.30, BTW.

I assume the when clauses with the condition editorLangId in 'julia.supportedLanguageIds'" cause this behavior. Can anybody confirm that it should be editorLangId == 'julia.supportedLanguageIds'" (swapping the in for the == operator)?

EDIT:

There may be a workaround: just comment out the when clause in your user keybindings.json like:

    {
        "key": "ctrl+enter",
        "command": "-language-julia.executeCodeBlockOrSelection",
        // "when": "editorTextFocus && activeEditor != 'workbench.editor.notebook' && editorLangId in 'julia.supportedLanguageIds'"
    },

I’m not that familiar with VS Code’s inner workings so, I hope somebody else can provide a better solution.

No, that should be injulia.supportedLanguageIds is an array.

Your workaround seems correct to me, but I do think there’s a VS Code bug here. Will investigate this tomorrow.

Thanks, this fixes it while the issue is ironed out.

Ok, seems like this issue is specific to the single quotes around julia.supportedLanguageIds.

    {
        "key": "ctrl+enter",
        "command": "-language-julia.executeCodeBlockOrSelection",
        "when": "editorTextFocus && activeEditor != 'workbench.editor.notebook' && editorLangId in julia.supportedLanguageIds"
    }

works fine for me.

Upstream issue:

1 Like