Adds basic keybinding for focusing on an element in outline pane#91799
Adds basic keybinding for focusing on an element in outline pane#91799bpasero merged 9 commits intomicrosoft:masterfrom
Conversation
|
Outline changes look legit - to @bpasero for changes on the list commands |
bpasero
left a comment
There was a problem hiding this comment.
This is very hard to understand until you realize that you added a list.focus command that is pretty much a copy of list.select with just a few modifications. Can you extract all the code of both commands into 1 reusable method and make the things that are actually different adjustable from the outside?
I also see that you changed from:
const fakeKeyboardEvent = getSelectionKeyboardEvent('keydown', false);
to
const fakeKeyboardEvent = getSelectionKeyboardEvent('keydown', true);
for the existing list.select. What is the reasoning?
Agreed, I was thinking on the same lines, but I refrained from doing it. I will update the PR.
Oh yes, looking back at it, it does not make sense to me. It should not have changed. I will switch to the older version for this, and flip the usage. |
…/vscode into focus_folder_path_in_sidebar
|
Left it hanging for quite sometime, @bpasero could you please take a look at it again? :) |
|
Also adding @joaomoreno to comment on the fact that we are about to introduce a new list/tree command I wonder if the name should actually be |
|
As you move up/down in the outline (and any tree/list) you're moving the focus. If you press Calling it @bpasero The concept exists everywhere. Here's windows: All those folders are selected, but only |
|
Yeah, I like |
|
Sure thing, @bpasero , I have made the changes. |
|
Thanks! |

This PR fixes #90732.
You can test out the change with the new key binding added under the name
list.focusfor the same feature.