Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Second command of macro no longer executed after recent VS Code update #65443

Closed
percygrunwald opened this issue Dec 20, 2018 · 3 comments
Closed
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@percygrunwald
Copy link

Issue Type: Bug

I use the macros extension to replicate the cmd+e behavior of IntelliJ for Mac. This command opens the "Recent files" dialogue and shifts the cursor to the previously open file (i.e. the second item in the list of recently opened files, where the currently open file is first on the list).

To do this in VS Code, I created this macro:

    // User Setings
    ...
    "macros": {
        "intellijRecent": [
            "workbench.action.quickOpen",
            "workbench.action.quickOpenNavigateNext",
        ]
    },
    ...

And bound it to cmd+e in my keybindings:

    // keybindings.json
    ...
    {
        "key": "cmd+e",
        "command": "macros.intellijRecent",
        "when": "!inQuickOpen"
    },
    ...

Up until the most recent update, this was working as expected: pressing cmd+e would open the recently open files dialogue box and move the cursor to the second item in the list. Today, it is opening the recently open files dialogue box, but not moving the cursor to the second item in the list.

I tried these changes to see if they would return the expected behavior, but they did not:

    "macros": {
        "intellijRecent": [
            "workbench.action.quickOpen",
            "workbench.action.quickOpenNavigateNext",
            "workbench.action.quickOpenNavigateNext"
        ]
    },
    "macros": {
        "intellijRecent": [
            "workbench.action.quickOpen",
            "workbench.action.quickOpenNavigateNextInFilePicker"
        ]
    },
    "macros": {
        "intellijRecent": [
            "workbench.action.quickOpen",
            "workbench.action.quickOpenNavigateNextInRecentFilesPicker"
        ]
    },

It seems to me that the second command is not being executed in the new update for some reason.

I have also reported this in the macros extension repo (geddski/macros#45).

Thank you.

VS Code version: Code 1.30.1 (dea8705, 2018-12-18T18:05:00.654Z)
OS version: Darwin x64 17.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (3.82GB free)
Process Argv -psn_0_1343816
Screen Reader no
VM 0%
Extensions (25)
Extension Author (truncated) Version
relative-path-and-line bgs 0.1.0
better-toml bun 0.3.2
gotemplate cas 0.3.0
gitignore cod 0.6.0
EditorConfig Edi 0.12.5
macros ged 1.2.1
beautify Hoo 1.4.7
elixir-ls Jak 0.2.24
intellij-idea-keybindings k-- 0.2.30
terraform mau 1.3.7
vscode-rufo mbe 0.1.1
python ms- 2018.12.1
vetur oct 0.14.3
erlang pgo 0.5.0
ruby reb 0.21.0
java red 0.36.0
jinjahtml sam 0.5.0
vscode-sass-format sas 1.1.6
elm sbr 0.24.0
code-settings-sync Sha 3.2.4
vscode-java-debug vsc 0.16.0
vscode-java-dependency vsc 0.2.0
vscode-java-pack vsc 0.5.0
vscode-java-test vsc 0.12.0
vscode-maven vsc 0.12.1
@vscodebot
Copy link

vscodebot bot commented Dec 20, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@alexdima
Copy link
Member

alexdima commented Dec 20, 2018

This is an issue with the extension. The promises returned by executeCommand are not properly waited upon here. It is a coincidence that this ever worked (due to the winjs promise implementation we used before).

@alexdima alexdima added the *caused-by-extension Issue identified to be caused by an extension label Dec 20, 2018
@percygrunwald
Copy link
Author

@alexandrudima thank you very much

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

2 participants