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

Quick open: Once "file results" are loaded, it resets selected file to the first #102480

Closed
jepperaskdk opened this issue Jul 14, 2020 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders quick-pick Quick-pick widget issues verified Verification succeeded
Milestone

Comments

@jepperaskdk
Copy link

When searching with ctrl+p, "recently opened" will show a list of files. Some time after, "file results" will extend the list with non-recently opened files as well.
The problem is that if i move the "cursor" down in recently opened to e.g. the 3rd item, then the position is reset to the 0th once the file results are retrieved. This is super annoying when you're switching between files in a large workspace.
Hope it makes sense, otherwise I can try to make a GIF showing the problem.

@bpasero
Copy link
Member

bpasero commented Jul 14, 2020

@chrmarti might need your advise here: I am setting the items of the picker here in one place:

My understanding is that this will not preserve any active item that was there before. Can I simply remember the active item via const activeItem = picker.activeItems[0] before setting the new picks and then restore that?

@bpasero bpasero self-assigned this Jul 14, 2020
@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug quick-pick Quick-pick widget issues labels Jul 14, 2020
@bpasero bpasero added this to the July 2020 milestone Jul 14, 2020
@jepperaskdk
Copy link
Author

Awesome @bpasero, thank you for a quick response - is there a PR for this issue?

@bpasero
Copy link
Member

bpasero commented Jul 16, 2020

No, but the change is 4855013 and should be available today in our insiders release.

@jepperaskdk
Copy link
Author

Works perfectly. :-)

@isidorn
Copy link
Contributor

isidorn commented Aug 6, 2020

Adding label verified since autho verified it.

@isidorn isidorn added the verified Verification succeeded label Aug 6, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders quick-pick Quick-pick widget issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@bpasero @isidorn @jepperaskdk and others