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

Search tree in multiroot doesn't collapse to one below root #161863

Merged
merged 1 commit into from Sep 27, 2022

Conversation

andreamah
Copy link
Contributor

Fixes #161858

Recording 2022-09-26 at 16 00 46

@andreamah andreamah self-assigned this Sep 26, 2022
@andreamah andreamah marked this pull request as ready for review September 26, 2022 23:04
@VSCodeTriageBot VSCodeTriageBot added this to the September 2022 milestone Sep 26, 2022
@@ -300,7 +300,7 @@ export function collapseDeepestExpandedLevel(accessor: ServicesAccessor) {
}
if (searchView.isTreeLayoutViewVisible && !canCollapseFirstLevel) {
const immediateParent = node.parent();
if (immediateParent instanceof FolderMatchWorkspaceRoot || immediateParent instanceof FolderMatchNoRoot) {
if (!(immediateParent instanceof FolderMatchWorkspaceRoot || immediateParent instanceof FolderMatchNoRoot || immediateParent instanceof SearchResult)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be easier to list the positive case at this point? (I guess, instanceof Match, FileMatch, FolderMatch?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True! It's a little clearer for me this way, though, since it lists the node types near the root that it can't be.

@andreamah andreamah merged commit 36b1398 into main Sep 27, 2022
@andreamah andreamah deleted the andreamah/issue161858 branch September 27, 2022 04:01
@github-actions github-actions bot locked and limited conversation to collaborators Nov 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search tree in multiroot doesn't collapse to one below root
3 participants