Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Actually don't sort folders when they are all root folders #34052
referenced this pull request
Sep 8, 2017
I see we do have https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/files/browser/views/explorerViewer.ts#L571 which marks roots as equal, but like you said it's related to V8 having an unstable sort, so I guess that alone won't work.
Yup! the original patch was mostly a proof of concept fix; it was my first time diving into the VSCode codebase, and this was easier than making the more correct fix, as you said, at the fileExplorer level.
I've updated it to add a rootIndex property to FileStat and sorting on that if the fileStat is a root.
This makes the FileStat constructor a little ugly though, i'm open to improvements.
@forivall thanks a lot for this PR.
You could inject the Workspace Context Service to the Sorter using