Actually don't sort folders when they are all root folders#34052
Conversation
|
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. |
0d51af4 to
8396f97
Compare
|
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. |
|
Alternatively, a |
|
@forivall thanks a lot for this PR. You could inject the Workspace Context Service to the Sorter using |
|
@isidorn cool! thanks! good ol' DI. (patch updated) |
|
@forivall looks good, thanks again! Merging in, will be available in tomorrow's insider build |
Fixes #34047
view the original poc fix at master...forivall:fix-multi-root-order-pocfix