VSCode Version 1.20.1
Commit f88bbf9137d24d36d968ea6b2911786bfe103002
Date 2018-02-13T15:34:36.336Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
OS Version: Windows 10
Steps to Reproduce:
Expected: Files are simply copied into the selected directory.
What actually happens: Files are copied but also a new workspace tab is opened for each file that was copied.
At the very least this should not even be a default behaviour thing if it's a desired feature. When performing explorer operations I expect the explorer functionality to work similar to every generic file explorer released where copying and pasting files doesn't mean I also perform additional operations on those files.
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
@ISInminkler I can not reproduce this behavior.
Do you see this with latest vscode insiders https://code.visualstudio.com/insiders/
@isidorn - Yes.
@isidorn - I even went in and disabled all plugins in my workspace and tried again. selecting multiple files in the explorer then pressing Ctrl + C to copy then selecting another folder and pressing Ctrl +V will paste the selected files but they will automatically open in the workspace.
@ISInminkler can you please attach a video of this?
I can not reproduce what you are seeing. Do you have any keybindings in your keybinds.json?
Also verified reproducible on my debian test VM, nothing special installed on it. Load up latest code: 1.20.1-1518535978. Ctrl + C to copy multiple files, create a new 'test' folder in another directory. Ctrl + V to paste, all files copied are automatically opened.
@isidorn - I don't have any video recording software. I have not created any custom keybinds.
@ISInminkler when you say opened you mean opened inside vscode (as in a new vscode tab). Not that every file gets a new VSCode window?
Also note: this happens even when using right-click context menus, not just when I use key-shortcuts.
@isidorn - correct. a new tab is created with the file opened automatically.
EDIT: I've edited my original bug to be more accurate that it opens a new tab, not a full new instance/window of vscode.
This seems to be a design decision that whenever we paste a file that we open it in the editor.
Code pointer
@bpasero is there some specific reason why we decided to explicitly open the folder on paste? I would remove this.
@isidorn that is probably some very old code from the time where you could drop files onto the explorer to import them. I would maybe check which cases we have and then decide what to do. Opening the file after an operation like this one seems OK to me because it is probably the intent to work on the files after copying them, no?
@bpasero "probably the intent to open" -> not so sure, I would say 50%. What if you are just moving some code around. I checked the golden standard Visual Studio and they are not opening.
However nobody else complained for the previous 3 years so I am also not convinced this needs changing.
This paste file action is only used when pasting files and nowehere else, so there are no other cases except pasting via keyboard or mouse.
@isidorn I also feel this is hard to judge and we didn't hear complaints so far. What is a bit ugly is that we open multiple files not just the last one, and since we now support multi-select it is more likely to happen that multiple unwanted files open. But then again, I bet we will get the opposite bug if we change this.
@bpasero I could change the paste file to only open the focused file while copying.
But let's leave this open for now and wait for user feedback. If nobody else complains I suggest no action.
@bpasero It wasn't something I really noticed until the multi-select. I will say though, opening the files being copied around automatically is a huge annoyance (even if it's only a single file). It's just less of an annoyance when it's only a single file as you can easily just close the single opened doc. I'm not sure why vscode breaks from other established conventions for file operations however.
This will sound like a "me too," but I wanted to agree that I didn't notice this behavior until multi-select became available. I copied a bunch of minified JavaScript files from a build folder into a mock-up deployment folder, and it opened all of them in all their minified glory--not only jarring, but also not useful.
I get that this behavior is useful when bringing in multiple files from outside the workspace, but--in the use-case described in this issue--the action is originating from within VSCode. Still, some users might like this.
I think the best option here is to add a setting to disable the feature, preferably when copying locally within the workspace, or--worst case--globally for all file-paste actions.
I would also prefer a setting or disable it completely. I'm copying some files frequently and everytime I have to close them. So +1 for it.
Yep, this is annoying purely in the case @TheJim01 mentioned. Frequently copy paste a bunch of large minified files and it opens them all... would love to be able to turn this off.
This is still happening in 2019, very annoying :(
协褌芯褌 斜邪谐 褉邪斜芯褌邪械褌 写邪卸械 褍 袪褍褋褋泻懈褏 胁 2020. =)
Has a setting been added to disable this ongoing issue? Would really like to stop the tabs from opening on paste. Thanks!
This works as expected. We no longer open files on paste