Closed sftd closed 8 years ago
struggling to recreate that sort order. perhaps it can be changed that files take precedence over folders,
Ok... For some reason tree-view version in my Atom i stuck on 0.187.0 and doesn't update any further. I will report if problem still exist when I will manage to update tree-view.
Edit: My guess would be that Atom core packages are only updated when Atom core is updated. As I wasn't aware of that my issue is probably outdated (at least according to @billybonks comment).
might be because i'm using the atom beta.
Reproduced on Atom v1.0.19 and tree-view v0.187.0. Could this have something to do with the natural sort change that was reverted in 0.194.0 for performance reasons? https://github.com/atom/tree-view/commit/3ef7d75b82b3f16188858d152a977b7739ebfb3a https://github.com/atom/tree-view/commit/ca1d1f60e519ad646733802b466ba800488a8ae7
Confirmed that javascript-natural-sort
which is now reverted is what was causing the issue.
$ node
> var ns = require('javascript-natural-sort')
undefined
> ns
[Function: naturalSort]
> ['1', '.', 'a', 'A'].sort(ns)
[ '1', '.', 'A', 'a' ]
> ['.gitignore', '1', 'a', 'A'].sort(ns)
[ '1',
'.gitignore',
'A',
'a' ]
This issue is probably safe to be closed.
When files and folders are sorted in
files list
the order is following:I think the right order should be:
Recently I started project where I have a few folder with names starting with number and as I'm using git for it the order is following:
It's a little bit unintuitive for me. I would prefer to have
.git
folder on top.Windows 8.1, Atom 1.0.19, tree-view 0.187.0