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

Unselecting selection among multi-selection and pressing DEL delete latest unselected item #108885

Closed
yann-papouin opened this issue Oct 18, 2020 · 7 comments · Fixed by #160342
Closed
Assignees
Labels
file-explorer Explorer widget issues insiders-released Patch has been released in VS Code Insiders under-discussion Issue is under discussion for relevance, priority, approach

Comments

@yann-papouin
Copy link

Version: 1.50.1 (user setup)
Commit: d2e414d
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041

Steps to Reproduce:

  1. Open a project/workspace with multiple files
  2. Select a range of files using SHIFT modifier
  3. Use CTRL modifier to unselect one file from current selection
  4. Press DEL to delete selection
  5. A confirmation to delete will prompt about deleting the latest unselected file
  6. Finally the unselected file is deleted

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

@vscodebot
Copy link

vscodebot bot commented Oct 18, 2020

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

@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2020

Yeah this is as designed. We always execute explorer commands on focused items, not on selected. Selection is respected only if focus belongs to it.
I see how in some cases this is not intuitive. However for now we would not change this.

@isidorn isidorn added file-explorer Explorer widget issues under-discussion Issue is under discussion for relevance, priority, approach labels Oct 23, 2020
@isidorn isidorn added this to the Backlog milestone Oct 23, 2020
@eamodio
Copy link
Contributor

eamodio commented Nov 17, 2020

This imo is really bad and I was bitten by it by deleting the exact thing I wished to NOT delete. The del shortcut should go with the selection (if there is any) over the focused item.

@isidorn
Copy link
Contributor

isidorn commented Nov 18, 2020

@eamodio but then do you argue that all commands in the explorer should just go with the selection, or only the delete one?
Does this hold when triggering via keyboard, context menu, command palette or always?

@mystiquewolf
Copy link

Why would someone select files without intention to act on them?

@github0013
Copy link

I have been having this issue, and I am hoping this gets fixed soon.

https://i.gyazo.com/51178dd63daef7bb9fa451c521ce8795.mp4

  1. shift + DOWN to select files
  2. control (or command) + CLICK to deselect a file
  3. control (or command) + DELETE to delete the files

*don't click anywhere else between 2 and 3

@psychopatt
Copy link

I was just bitten by this and had to dig up the victim from the trash, so I took the time to understand what had happened and figured out this behaviour. Now I realize it already had happened when copy/pasting files, whithout me investigating since it was less problematic.

@eamodio but then do you argue that all commands in the explorer should just go with the selection, or only the delete one? Does this hold when triggering via keyboard, context menu, command palette or always?

So I don't know if there's any other command than these, but I think selection should be used over focus when present, since as @mystiquewolf perfectly worded it:

Why would someone select files without intention to act on them?

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Sep 7, 2022
@lramos15 lramos15 modified the milestones: On Deck, September 2022 Sep 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
file-explorer Explorer widget issues insiders-released Patch has been released in VS Code Insiders under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants