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

vscode.commands.executeCommand('workbench.action.openEditorAtIndex1') does not resolve #44636

Closed
arussellk opened this issue Feb 27, 2018 · 1 comment
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@arussellk
Copy link
Contributor

Version info:

  • VSCode Version: Version 1.20.1 (1.20.1)
  • OS Version: macOS 10.13.3 (High Sierra)

Summary of issue:
When running an extension, the promise returned by vscode.commands.executeCommand('workbench.action.openEditorAtIndex1') does not resolve if there is an editor which corresponds to the given index. I noticed this behavior because I tried to await this command from some automated tests in the VSCodeVim repo.

I made a small extension to demonstrate the unexpected behavior: https://github.com/arussellk/vscode-workbench-action-openeditoratindex1-bug-repro

The relevant code and comments are in src/extension.ts.

Steps to Reproduce:

  1. Open the above project in VSCode
  2. Launch the extension with Debug > Start Debugging or F5
  3. In the window that just launched, execute the editor command Hello World (for macOS users, cmd+shif+P then type Hello World and press enter)
  4. View the debug console to see that openEditorAtIndex1 was never logged

Expected behavior:
I expect the promise from the command to resolve or fail every time it is called. It appears that when there is an editor that corresponds to an index, that promise neither resolves nor rejects.

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

Let me know if you want any additional information.

Thanks! =)

@weinand weinand assigned bpasero and unassigned weinand Feb 27, 2018
@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Feb 28, 2018
@bpasero bpasero added this to the February 2018 milestone Feb 28, 2018
@bpasero bpasero closed this as completed Feb 28, 2018
bpasero added a commit that referenced this issue Feb 28, 2018
@jrieken jrieken added the verified Verification succeeded label Mar 1, 2018
@jrieken
Copy link
Member

jrieken commented Mar 1, 2018

verified by review

arussellk added a commit to arussellk/Vim that referenced this issue Mar 12, 2018
Previously there was a bug in VSCode which prevented me from doing:
```
await
vscode.commands.executeCommand('workbench.action.openEditorAtIndex1')
```

The most recent release of VSCode (1.21.0) fixes the bug. See
microsoft/vscode#44636
jpoon pushed a commit to VSCodeVim/Vim that referenced this issue Mar 12, 2018
Previously there was a bug in VSCode which prevented me from doing:
```
await
vscode.commands.executeCommand('workbench.action.openEditorAtIndex1')
```

The most recent release of VSCode (1.21.0) fixes the bug. See
microsoft/vscode#44636
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants