geddski / macros

macros support for VS Code
MIT License
166 stars 36 forks source link

workbench.action.focusActiveEditorGroup has no effect in certain macros #32

Closed bersbersbers closed 6 years ago

bersbersbers commented 6 years ago

This issue is also described in https://stackoverflow.com/questions/49457051

Basically, while "workbench.action.focusActiveEditorGroup" can be issued in a key binding, it seems to have no effect when used in a macro immediately after "editor.debug.action.selectionToRepl". What does work is to use the same key binding twice: in the second run, "editor.debug.action.selectionToRepl" does not do anything (there is no active editor and thus no selection) and the second command just works. However, this is only possible for key bindings which are not captured by the debug console itself, so not really a good workaround.

    "macros": {
        "selectionToReplAndReturnToEditor": [
            "editor.debug.action.selectionToRepl",
            "workbench.action.focusActiveEditorGroup",
        ]
    }
bersbersbers commented 6 years ago

This works in https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command