-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Adds basic keybinding for focusing on an element in outline pane #91799
Adds basic keybinding for focusing on an element in outline pane #91799
Conversation
Outline changes look legit - to @bpasero for changes on the list commands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.focus
for the same feature.