-
Notifications
You must be signed in to change notification settings - Fork 28k
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
'list.select' keybinding not working in file Explorer pane #107377
Comments
This is tree widget behavior thus forwarding to @joaomoreno |
While trying to reproduce it, although I wasn't able to, I found another issue where when a file is selected, close the file in the editor(I used Ctrl + w), the explorer doesn't 'deselect' the file just closed, so any efforts trying to reopen the file by firing Also note: I had to use Another note: What seems to make sense to me is that when you close the file in the editor, VSCode should also Another note: My current workaround: use |
I'm surprised you can't reproduce my issue, it's completely consistent across several machines for me, although settings sync could be synching a problematic configuration. Still I can't help wondering whether clarifying the reproduction steps might help.
|
In my case, in step 4, the new file is selected and shown in the editor with Note: Can you still reproduce it if you were to start code using |
Yes. I see the same effect with all extensions disabled. |
@isidorn This seems to be a bug on the Explorer, something broke here lately. Steps:
The second file should be selected, but the first remains selected. |
@isidorn This can easily be fixed by deleting the entire vscode/src/vs/workbench/contrib/files/browser/fileCommands.ts Lines 147 to 163 in b1c54c1
list.select command should work just fine in the explorer.
|
@joaomoreno I just checked stable and we also behave the same there. Ok now you commented again, let me see what removing that code does... |
Are you sure? The
Can you check what gets run instead of the |
@joaomoreno in that case the selection does not change. And the select event probably does not fire. Read the description of that issue carefully "open a file with the mouse |
The problem seems to be that the code that reveals in the tree the opened text editor file is not working in this case, since all your command does is open a file. Notice in the GIF how that reveal feature works just fine when I use the command palette to switch files. But it just seems not to work at all when going through your custom command. |
Yeah. I agree, that seems to be the issue. |
Oh. Yeah that's the thing. Yeah you need a custom command for that. Sorry about that. |
Found the issue, pushing fix... |
@Neutrino-Sunset |
The default configuration appears to be that both But I don't understand though. What do I need to do in order to be able to open a file in Explorer using the keyboard and have the correct file appear selected? Do I need to rebind |
The bug was that it did not appear selected. I have pushed a fix for that. |
So I just need to wait for the fix to come through. Great, many thanks. |
@Neutrino-Sunset it is already released in vscode insiders if you want to try it out you can. |
Issue Type: Bug
When I select a file in the Explorer with the mouse, it opens that file but also 'selects' it, highlighting it with a prominent highlight.
Firstly I don't understand the purpose of this selection. It doesn't do anything. If I use the keyboard to move the keyboard focus to a different file, the 'selection' remains on the file I opened with the mouse, but if I now use a shortcut to perform some action e.g. rename, delete, this action occurs on the file with the keyboard focus not the apparently 'selected' file! So what the hell is the selection for? But I've already reported that and had that bug report closed as 'by design' on the basis that while it doesn't make any sense at all that's the way the vscode team want to do it anyway. Fine, whatever.
So this bug is to report a related but distinct issue. Which is that the keybinding for
list.select
doesn't work. On my system the keybinding forlist.select
isEnter
which is its default value. If I click a file in the Explorer with the mouse it is opened and also selected. If I then use the keyboard to move the keyboard focus to another file and pressEnter
the file is opened, but the file selected using the mouse remains the one highlighted as being selectedThat's got to be a bug right?
Here are some screenshots to show you what I'm talking about.
VS Code version: Code 1.49.1 (58bb7b2, 2020-09-16T23:27:51.792Z)
OS version: Windows_NT x64 10.0.18362
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (16)
The text was updated successfully, but these errors were encountered: