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

Duplicate File action only works on open files #148

Open
Nokel81 opened this issue Oct 12, 2019 · 1 comment
Open

Duplicate File action only works on open files #148

Nokel81 opened this issue Oct 12, 2019 · 1 comment
Labels
enhancement Indicates new feature requests help wanted user-feedback

Comments

@Nokel81
Copy link

Nokel81 commented Oct 12, 2019

Describe the bug
When executing the "Duplicate File" actions from the command pallet (or more generally a keyboard shortcut) and no file is currently open (but the explorer is active and an item is selected) an error occurs saying that a file needs to be open. This also means that if you have a file open but the explorer is what is currently active you cannot duplicate the currently active selection

To Reproduce
Steps to reproduce the behavior:

  1. Close all files
  2. Select a file in the explorer
  3. Call up the command pallet and execute the file duplicate action
  4. An error is displayed

Expected behavior
The currently selected file/folder is duplicated

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • VSCode Version: 1.39.0
  • OS Version: 10.0.17763
@sleistner sleistner added the bug Indicates an unexpected problem or unintended behavior label Oct 14, 2019
@sleistner sleistner added help wanted enhancement Indicates new feature requests and removed bug Indicates an unexpected problem or unintended behavior labels Jan 15, 2020
@dmn-seasony
Copy link

A related issue is that duplicating a folder using a keybinding or the command palette doesn't work (it duplicates the currently open file instead). Both issues are caused by the fact that VSCode doesn't expose an API to get the currently selected file/folder from the explorer view. See microsoft/vscode#3553, where some possible workarounds are also mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests help wanted user-feedback
Projects
None yet
Development

No branches or pull requests

3 participants